[ABQ-pm] Daylight Saving Time on Windows ActivePerl
Joe Calkins
jcalkins at swcp.com
Mon Mar 12 10:05:40 PDT 2007
If you're using the ActiveState distribution of Perl AND you've set the TZ environment variable
(TZ=MST7MDT), your localtime() will report the wrong time. It's not Perl that needs to be fixed. Perl
with TZ uses the Microsoft Visual C Runtime library (msvcrt.dll) to keep track of which years have
which rules. If you haven't set TZ then Perl just uses what Windows gives it.
Here's the page at Activestate to start you through the fix process.
http://support.activestate.com/faq/activeperl-and-the-2007-d
At the end of the install process the installer asked if I wanted to reboot now or later. When I
clicked "later" the computer shut down anyway, crashing a bunch of things on the way. I (now)
recommend closing all applications before installing this update.
Why use TZ? The Date::Manip module uses it and you can get accurate time information for past years
in localtime(), as opposed to using the Windows regional time setting.
--
Joe Calkins
jcalkins at swcp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/albuquerque-pm/attachments/20070312/599e0f49/attachment.html
More information about the Albuquerque-pm
mailing list