develooper Front page | perl.perl5.porters | Postings from October 2003

[ Re: TZ cache on some Linux kernels]

Ilya Zakharevich
October 2, 2003 22:55
[ Re: TZ cache on some Linux kernels]
Message ID:
Can we have Configure tests for this?  I would classify the current
behaviour of Perl as a bug...

Hope this helps,

----- Forwarded message from Jon Ryder <> -----
 --- Ilya Zakharevich <> wrote:
> [A complimentary Cc of this posting was sent to
> Jon
> <>], who wrote in article
> <>:
> > While doing some time/date functions I had to
> change the timezone used
> > (by changing the ENV{TZ}) twice in one script. 
> However, it seems the
> > kernel cached the last zone and failed to open or
> change to the new
> > one.  I confirmed this using strace, as you could
> see it only opened
> > the one file.  The code I used is as follows.
> > 
> > $ENV{TZ} = ':/usr/share/zoneinfo/Europe/London';
> Check whether tzset() is required on your system... 
> It is a Perl bug
> that it does not call tzset() when/if required.
> In principle, tzset() is available in POSIX.
> Hope this helps,
> Ilya

Thanks a lot - by using POSIX::tzset() after I change
the TZ it will load the correct timezone file and give
the expected results.

Thanks again :-)


Want to chat instantly with your online friends?  Get the FREE Yahoo!

----- End forwarded message ----- Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About