Greetings Brothers. I'm having trouble with timelocal.
my $sec = 0;
my $min =0;
my $hr = 0;
$epoch = timelocal( $sec, $min, $hr, $d, $m, $y-=1900 ) + $plus * 8640
+0;
print "Date $sec, $min, $hr, $y, $m, $d = $epoch\n";
$sec = 59;
$min = 59;
$hr = 23;
$epoch = timelocal( $sec, $min, $hr, $d, $m, $y-=1900 ) + $plus * 8640
+0; # line 51
print "Date $sec, $min, $hr, $y, $m, $d = $epoch\n";
Produces output of
Date 0, 0, 0, 109, 8, 2 = 1251864000
Cannot handle date (59, 59, 23, 2, 8, 109) at /cygdrive/c/Documents an
+d Settings/nwatson/My Documents/bin/foo line 51
Why the error? Even when both timelocal calls are identical the error persists.