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

[jon18_uk2002@yahoo.co.uk: Re: TZ cache on some Linux kernels]

From:
Ilya Zakharevich
Date:
October 2, 2003 22:55
Subject:
[jon18_uk2002@yahoo.co.uk: Re: TZ cache on some Linux kernels]
Message ID:
20031003055526.GA3058@math.berkeley.edu
Can we have Configure tests for this?  I would classify the current
behaviour of Perl as a bug...

Hope this helps,
Ilya

----- Forwarded message from Jon Ryder <jon18_uk2002@yahoo.co.uk> -----
 --- Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:
> [A complimentary Cc of this posting was sent to
> Jon
> <jon18_uk2002@yahoo.co.uk>], who wrote in article
> <83bd902f.0310010927.456738aa@posting.google.com>:
> > 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 :-)

Jon.

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

----- End forwarded message -----



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About