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]

Reply via email to