http://qs321.pair.com?node_id=826220


in reply to How to set a processes notion of the timezone on win32?

Thanks to those that replied.

Jan "jdb" Dubois on #win32@irc.perl.org suggested a fix that works well.

use Time::Piece; $ENV{TZ} = 'UTC'; Time::Piece::_tzset();

According to Jan, this requires atleast Time::Piece 1.14 and is fully fixed in 1.17.

There is also a tzset() in POSIX which I had initially considered but it gives a "not implemented" error on current strawberry perl. Hopefully that is just a bug which will soon be rectified.

Update: Time::Piece 1.12 appears to work as well.

--
જલધર

Replies are listed 'Best First'.
Re^2: How to set a processes notion of the timezone on win32?
by Anonymous Monk on Mar 02, 2010 at 23:59 UTC
    There is also a tzset() in POSIX which I had initially considered but it gives a "not implemented" error on current strawberry perl.

    Hmm, thats a very stupid bug in strawberryperl. I compiled my perl with mingw like strawberry, and my POSIX comes with tzset