Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Produces output ofmy $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";
Why the error? Even when both timelocal calls are identical the error persists.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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: timelocal error when executed twice.
by almut (Canon) on Oct 19, 2009 at 17:48 UTC | |
by Anonymous Monk on Oct 19, 2009 at 17:57 UTC | |
|
Re: timelocal error when executed twice.
by stonecolddevin (Parson) on Oct 19, 2009 at 18:55 UTC | |
|
Re: timelocal error when executed twice.
by markkawika (Monk) on Oct 19, 2009 at 17:28 UTC | |
|
Re: timelocal error when executed twice.
by bv (Friar) on Oct 19, 2009 at 17:40 UTC | |
|
Re: timelocal error when executed twice.
by bichonfrise74 (Vicar) on Oct 19, 2009 at 17:31 UTC | |
|
Re: timelocal error when executed twice.
by ikegami (Patriarch) on Oct 19, 2009 at 23:22 UTC |