Time::Local bug/weirdness? 
Author Message
 Time::Local bug/weirdness?

I'm getting inconsistent values from Time::Local on two version of perl.

Can anyone explain/repeat the following on the same machine?  The
machine is a:

  SunOS 5.5.1 sun4m sparc SUNW,SPARCstation-20

The older release of perl is version 5.003, and the newest is version
5.004_60.

The script looks like this:

   use Time::Local;
   # March 7, 98, my bday - arbitrary date
   $time = timelocal(0,0,0,7,3,98);


   # Recalculate - except make it the 1st of the month.
   $lt[3] = 1;

   print "  time: $time\ntltime: $tltime\n";

The older version of perl produces:

   0,0,0,7,3,98,2,96,1
     time: 891925200
   tltime: 891403200

And the newer version of perl produces:

   0,0,0,7,3,98,2,96,1
     time: 891925200
   tltime: 891410400

As you can see, timelocal gives different values.  7200 seconds is the
difference, or 2 hours.  This behavior didn't surface in my applications
until recently, and given that it's 2 hours that are involved I am
suspicious of something having to do with daylight savings time.

Any ideas/corroboration would be appreciated.

--



Fri, 29 Sep 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Time::Local bug/weirdness?

2. serious bug in Time::Local?

3. Time::Local and Net::FTP bug conspiracy

4. Time::Local vs. Daylight Savings Time

5. PERLFUNC: localtime - convert UNIX time into record or string using local time

6. PERLFUNC: localtime - convert UNIX time into record or string using local time

7. Unix time, local time, year 2000 question.

8. One bug with local and one bug with perlbug

9. high resolution timing weirdness

10. open/popen weirdness/bug?

11. reality check for time local

12. Decrementing Local Time

 

 
Powered by phpBB® Forum Software