]> granicus.if.org Git - neomutt/commitdiff
A y2k fix for those who still use two-digit year numbers as
authorThomas Roessler <roessler@does-not-exist.org>
Sat, 1 Jan 2000 17:59:20 +0000 (17:59 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sat, 1 Jan 2000 17:59:20 +0000 (17:59 +0000)
originally specified in RFC 822.

parse.c

diff --git a/parse.c b/parse.c
index 70543a9795f1536d88411703e92447dcdce8bbdb..6422783022398473efe30fa6b1bcb1ba4e649c46 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -721,7 +721,9 @@ time_t mutt_parse_date (const char *s, HEADER *h)
 
       case 2: /* year */
        tm.tm_year = atoi (t);
-       if (tm.tm_year >= 1900)
+        if (tm.tm_year < 70)
+         tm.tm_year += 100;
+        else if (tm.tm_year >= 1900)
          tm.tm_year -= 1900;
        break;