At 22:17 -0800 30/01/2011, John W. Krahn wrote:
p...@mail.nsbeta.info wrote:
$ perl -MTime::Local -le 'print timelocal(0,0,0,1,1,1900)'
Cannot handle date (0, 0, 0, 1, 1, 1900) at -e line 1
why Time::Local can't handle the date of 1900?
Unix time starts at 1 Jan. 1970 so a time in 1900 is invalid.
Time for someone to RTFM I think!
<http://perldoc.perl.org/Time/Local.html>
#!/usr/local/bin/perl
use Time::Local 'timelocal_nocheck';
print scalar localtime timelocal_nocheck 0,0,0,1,1,1900;
JD
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/