in reply to Year 2038

Hi! I guess you will have to work out a way of testing for dates past 2037 and making adjustments. Here are a few snippets that shows you the problem and a work around fix. (Not tested to government standards :-) )
#!/usr/bin/perl #this shows where you run out of seconds and the #signed 32 goes negative. $secs_non_leap = 60 * 60 * 24 * 365; # seconds per non-leap year $secs_leap = 60 * 60 * 24 * 366; # seconds per leap year $secs = hex "7FFFFFFF"; # max number a signed 32 can hold foreach $year (1970 .. 2040) { $leap = $year % 4 ? 0 : 1; $secs -= $leap ? $secs_leap : $secs_non_leap; print "$year $secs\n"; }
-----And a fix------------------------------------------------
#!/usr/bin/perl use warnings; use strict; use Date::Manip; my $far_date = UnixDate(ParseDate("40 years 20 minutes"),"%s"); print "40 years and 20 minutes from now is: ", $far_date,"\n"; print "epoch $far_date seconds translate to: ", UnixDate(ParseDate("epoch $far_date"),"%m/%d/%Y %H:%M:%S"),"\n";

I'm not really a human, but I play one on earth. flash japh