* extfs/mailfs (parse_date): Correctly handle two-digit years

between 1970 and 1999.
This commit is contained in:
Pavel Roskin 2001-02-19 18:42:12 +00:00
parent ae3603cdc8
commit 1a4495c4c7
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-02-19 Pavel Roskin <proski@gnu.org>
* extfs/mailfs (parse_date): Correctly handle two-digit years
between 1970 and 1999.
2001-02-14 Pavel Roskin <proski@gnu.org>
* vfs.c (vfs_parse_filedate): Don't reset got_year to 0 while

View File

@ -27,7 +27,7 @@ if (eval "require Date::Parse") { # fancy date parsing available?
# Date: Mon, 27 Mar 100 16:30:47 +0000 (GMT)
if (/(\d\d?) ([A-Z][a-z][a-z]) (1?\d\d) (\d\d?:\d\d)/) {
$correct_year = 1900 + $3;
if ($correct_year < 2000) {
if ($correct_year < 1970) {
$correct_year += 100;
}
return "$2 $1 $correct_year $4";