in reply to Re: DateTime Daylight savings question
in thread DateTime Daylight savings question

ikegami and you are both right! It came to be a rather simple fix, but interesting still.

Here's what happened. When the last DST patch came along from Windows they did not have one for Win2k (non-paying that is). There was a 3rd party fix, that for whatever reason did not work, after I installed some security updates. I manually disabled the DST setting in my Windows Time, and simply dropped the time down an hour. Hence, the "is Daylight Savings" flag being zero.
When I turned on the "Daylight Savings" mode checkbox, my system jumps ahead an hour.
use DateTime; use DateTime::TimeZone; my $dt = DateTime->now; # same as ( epoch => time() ) print( $dt->hms, "\n" ); $dt->set_time_zone( 'America/New_York' ); print( $dt->hms, "\n" ); $dt->set_time_zone( 'EST' ); print( $dt->hms, "\n" ); #Results (With the DST enabled AND disabled..Doesnt matter). 01:10:49 21:10:49 20:10:49
This is more of a system issue at this point and not a Perl problem, but if anyone has any advice I would be appreciative.

Replies are listed 'Best First'.
Re^3: DateTime Daylight savings question
by ikegami (Patriarch) on Sep 20, 2008 at 00:18 UTC
    Download these three files and double-click the .cmd file. That's the patch we used at the office to fix Win2k systems.
Re^3: DateTime Daylight savings question
by jsilva_im (Novice) on Sep 20, 2008 at 00:17 UTC
    (I was not logged in, I apologize for that last comment" broomduster's code for the timezone was interesting
    When the DST checkbox in Windows was checked it yielded a "1". Don't know if that helps or not.