Re: TZ info used by dB drivers



On 7/8/07, d_roesler@xxxxxxxxxxx <d_roesler@xxxxxxxxxxx> wrote:

I'm trying to track down how TZ info is used by a dB driver, in this case
DBD::Ingres.

It would appear that TZ is getting passed to the driver on the first
connection (when the driver is installed) and doesn't see changes to
$ENV{TZ} between the first connection and subsequent connections in the
running script.

If this is a driver issue is there an "uninstall driver" method, such that
subsequent connections will reload the driver in the running script so the
changed $ENV{TZ} will be seen? If this is a DBI issue is there a way for
the changed $ENV{TZ} value to be seen in the driver?



There are multiple places that could be affected by this - I just spent the
weekend chasing timezones around a JDBC driver, and it is painful.

The underlying Unix API really only provides one function call to control
the current time zone, and call is tzset(). No arguments, no return value.
It gets called implicitly by a bunch of functions, too, if they think it
necessary. The result is 'gating'; the time zone is set once and not
adjustable thereafter -- which is what you are observing.

Speculation: maybe, just maybe, if you set the environment and manage to
explicitly call tzset() afterwards, it might, conceivable notice the new
time zone. But I'm not confident that it would, and could easily be
platform specific.

The java.util.Date, java.util.Calendar and java.util.TimeZone APIs allow for
a lot of control and information for which there is no corresponding C API,
sadly.


--
Jonathan Leffler <jonathan.leffler@xxxxxxxxx> #include <disclaimer.h>
Guardian of DBD::Informix - v2007.0226 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."


Relevant Pages

  • [bug] stuck localhost TCP connections, v2.6.26-rc3+
    ... That connection has been stuck for 9 ... and it occured on two boxes, both are SMP ... # Bus options ... # Generic Driver Options ...
    (Linux-Kernel)
  • Re: HP JetDirect (now media center and HP 3310)
    ... The problem I am having is not with a HP printer driver. ... In this situation the drive is accessible through Windows Explorer. ... Windows Explorer to force a connection and get Transfer Images to work. ... I am not sure if this will completely work since the setup program may do ...
    (microsoft.public.windowsxp.print_fax)
  • Re: HP JetDirect (now media center and HP 3310)
    ... The problem I am having is not with a HP printer driver. ... In this situation the drive is accessible through Windows Explorer. ... Windows Explorer to force a connection and get Transfer Images to work. ... I am not sure if this will completely work since the setup program may do ...
    (microsoft.public.windowsxp.print_fax)
  • Re: Driver AutoCommit issue
    ... Isn't the XA driver for the distributed transaction, ... the connection pool was getting created. ... When in the code do you do a commit? ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: TCP/IP over USB
    ... So I think that your best chance is getting the RNDIS driver to work ... sort of a device it is and the PC loads a corresponding driver for it. ... The Advanced option is set via the ActiveSync ... Use the ActiveSync connection ...
    (microsoft.public.windowsce.embedded.vc)