On Fri, Jul 01, 2005 at 05:12:41PM -0400, Scott R. Godin wrote:
> 5:10pm {638} localhost:/home/webadmin/>$ cat mydate
> #!/usr/bin/perl -l
> use Date::Parse qw/str2time/;
> my $d = $ARGV[0];
> my $utime = str2time("01/01/$d");
> print "$utime\t", scalar localtime $utime;
> 
> 5:10pm {639} localhost:/home/webadmin/>$ ./mydate 1956
> -441831600      Sun Jan  1 00:00:00 1956

Times on UNIX are usually stored as seconds since 1970, so library
functions which deal with times as numbers are unlikely to correctly
handle dates before 1970 (or after 2037 for 32-bit systems).

-- 
"You're so sadly neglected, and often ignored.
A poor second to Belgium, When going abroad."
    -- Monty Python - "Finland"

Reply via email to