Fix Y2K problem once again.

This commit is contained in:
Pavel Roskin 2002-12-13 05:08:14 +00:00
parent 84f178c86f
commit 72da5347c4

View File

@ -21,7 +21,8 @@ my $parsedates = eval "require Date::Parse";
sub timef
{
my @time=localtime($_[0]);
return sprintf "%02d-%02d-%02d %02d:%02d", $time[4]+1, $time[3], $time[5]%100, $time[2], $time[1];
return sprintf "%02d-%02d-%02d %02d:%02d", $time[4]+1, $time[3],
$time[5]+1900, $time[2], $time[1];
}
# parse given string as a date and return unix time