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.

--
જલધર