Oops, I think I have it backwards: CDT = GMT - 5. MDT = GMT - 6. CST = GMT - 6. MST = GMT - 7.
So, today you should be 6 hours earlier than GMT. I wonder if it is a problem with the way you have your TZ set. Dirk Bremer - Systems Programmer II - ESS/AMS - NISC St. Peters 636-922-9158 ext. 8652 fax 636-447-4471 [EMAIL PROTECTED] www.nisc.cc ----- Original Message ----- From: "Dirk Bremer (NISC)" <[EMAIL PROTECTED]> To: "perl-win32-users" <[EMAIL PROTECTED]> Sent: Wednesday, October 23, 2002 10:57 Subject: Re: when localtime isn't? > I ran your code here in CDT: > > 58 52 10 23 9 102 3 295 1 > Local: Wed Oct 23 10:52:58 2002 > GMT: Wed Oct 23 15:52:58 2002 > > CDT = GMT - 6. MDT = GMT - 7. CST = GMT - 5. MST = GMT - 6. It looks to me > that the culprit is gmtime, it is not taking into account the daylight > savings time offset. > > Dirk Bremer - Systems Programmer II - ESS/AMS - NISC St. Peters > 636-922-9158 ext. 8652 fax 636-447-4471 > > [EMAIL PROTECTED] > www.nisc.cc > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: "perl-win32-users" <[EMAIL PROTECTED]> > Sent: Wednesday, October 23, 2002 10:24 > Subject: when localtime isn't? > > > > > > > > > > > > > > Ok, localtime() has always done what I expected in the past, but on my > > win2k machine(and 3 others I have tested), it doesn't. > > > > Under win2k this > > > > print "TZ = $ENV{TZ}\n"; > > @time = localtime(); > > print "@time\n"; > > print "Local: " . scalar localtime() . "\n"; > > print " GMT: " . scalar gmtime() . "\n"; > > > > says this: > > > > TZ = MST-7MDT > > 48 46 22 23 9 102 3 295 1 > > Local: Wed Oct 23 22:46:48 2002 > > GMT: Wed Oct 23 14:46:48 2002 > > > > > > So, the GMT is correct -- it's 8:46am MST == GMT - 7 hours + 1 for DST, > but > > localtime is returning GMT + 8 hours. My NT machine set to the same > > timezone correctly reports the same GMT and the correct localtime. So, > the > > question is, what do I have configured wrong? (surely localtime is not > > broken!) > > > > Steve > > > > > > _______________________________________________ > > Perl-Win32-Users mailing list > > [EMAIL PROTECTED] > > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > > > > > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs