in reply to Re: %ENV{TZ} does not always affect CORE::localtime() under multi-threaded perl
in thread %ENV{TZ} does not always affect CORE::localtime() under multi-threaded perl

Could you please try this:
perl -e '$ENV{TZ} = "EST";print scalar localtime(), "\n";$ENV{TZ} = "DST";print scalar localtime(), "\n";'
It works correctly at 5.6.1 and misbehaves at 5.8.0

--dda

  • Comment on Re: Re: %ENV{TZ} does not always affect CORE::localtime() under multi-threaded perl
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: %ENV{TZ} does not always affect CORE::localtime() under multi-threaded perl
by Anonymous Monk on Apr 16, 2003 at 20:51 UTC
    What dda means to say is:

    here is the output on a redhat 8, perl 5.8.0 (multithreaded) box (actually we have tried 3 redhat 8 boxes):

    perl -e '$ENV{TZ} = "EST";print scalar localtime(), "\n";$ENV{TZ} = "DST";print scalar localtime(), "\n";'
    Wed Apr 16 15:47:41 2003
    Wed Apr 16 15:47:41 2003


    whereas on a redhat 7.2, perl 5.6.1 box, the output is
    Wed Apr 16 15:42:25 2003
    Wed Apr 16 20:42:25 2003


    and on a freebsd box, perl 5.8.0, the output is also correct, i.e.
    Wed Apr 16 15:42:25 2003
    Wed Apr 16 20:42:25 2003

    perl 5.6.1 under cygwin seems to manifest the problem also.
Re: Re: Re: %ENV{TZ} does not always affect CORE::localtime() under multi-threaded perl
by The Mad Hatter (Priest) on Apr 16, 2003 at 21:00 UTC
    Hmmmm, I see what you mean. Seems like a bug (like you said).

    Just to let every know, output is:

    Wed Apr 16 15:56:22 2003 Wed Apr 16 15:56:22 2003