
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.
--