Mutt as a small y2k problem on the receiving end.  While mutt works
just fine with four-digit year numbers, RFC 822 originally specifies
two-digit year numbers, which still seem to be permitted.  (Not that
any one should be using them nowadays...  However, at least one user
seems to have stumbled over them in the wild already.)

The following patch applies to the stable and unstable code branches
and makes mutt deal properly with two-digit dates < 70.

diff -u -u -r2.17 -r2.18
--- parse.c     1999/11/18 10:31:09     2.17
+++ parse.c     2000/01/01 17:59:20     2.18
@@ -721,7 +721,9 @@
 
       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;
 

-- 
http://www.guug.de/~roessler/

PGP signature

Reply via email to