Thanks, Drieux. Somewhere along the line and for reasons I realy don't remember, I added a variable TZ set to PST. Up til the switchover, I know the time outputted for my scripts was correct. I removed from the environment. Re-booted machine and I am back in sync with the correct time.
I quess maybe a Perl guru can tell us if someone knows why the TZ envirionment variable would not affect the output of correct tims when not on Daylight Saving time and affect it when we switched over? Again, very sorry for the amount of time people spent on this. I know that I would not just have put in the TZ variable without some input from a perl source or something? Other than the MKS Korn shell, I don't use Unix setup. So I just don't know. Again thanks to the list in helping me get it back in order. Wags ;) -----Original Message----- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 21, 2002 09:27 To: [EMAIL PROTECTED] Subject: Re: Time being displayed is off my 7 hours On Sunday, April 21, 2002, at 08:01 , [EMAIL PROTECTED] wrote: > Just doing a call to : > > sub get_time { > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = > localtime(time - $diff); > $mon++; > } # end of get_time This Always worries me - make the drieux FEEL saver - sub get_time { my ($diff) = shift; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time - $diff); $mon++; } # end of get_time this way - since we KNOW who is setting and passing it around.... a) you should have 'perl -w' - for the warnings b) you MUST have 'use strict' - we may find that there is some place where "$diff" is getting set and scragged.... [..] you might check with: [jeeves:~] drieux% perl -e 'print localtime(time) . "\n"' ; Sun Apr 21 09:11:17 2002 [jeeves:~] on both machines - but lets peek at the data you sent.. > w2k: > aapl079.pl: Load Bible Hash St : 15:00:09 > MyDisp: 0 -> Passed to proc_step1 MySecs: 978350400 MyCurrSecs: > 1019401209 [..] > aapl079.pl: Load Bible Hash En : 15:00:09 > > nt 4.0: > aapl079.pl: Load Bible Hash St : 08:00:09 > MyDisp: 0 -> Passed to proc_step1 MySecs: 978350400 MyCurrSecs: > 1019401209 [..] > aapl079.pl: Load Bible Hash En : 08:00:09 > > The actual time is 08:00. if I assum that 'MyCurrSecs' is the traditional 'seconds' since the epoch - ala [jeeves:~] drieux% perl -MTime::localtime -e 'print ctime(1019401209) . "\n" ; ' Sun Apr 21 08:00:09 2002 [jeeves:~] drieux% so a part of the question seems to be if the w2k perl function 'localtime' is a part of your 'issue' = hence you should be using use Time::localtime; cf: also perldoc Time::Local .... wherein we find " timelocal() is implemented using the same cache. We just assume that we're translating a GMT time, and then fudge it when we're done for the timezone and daylight savings arguments. " you may also want to check perl -e 'print $ENV{'TZ'} . "\n";' which should return you 'nothing' - unless there is some funk being played on your win2k box... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]