It seems that some MUA's didn't handle y2k very well - ELM seems to be
one of them, and Ultrix's DXmail (based on MH!). I've got a few emails
this month that look like:
575 Jan 00 Xxxxxx Xxxx 3603 ...
and
22+ Jan 00 Xxx Xxxxx 1771 ...
The first has "15 Jan 100" as the date and the second has "19 Jan 00" as
the date. The following works around this so that scan, show, sortm, etc
work ok.
This patch uses windowing, so it may be subject to stoopid patent claims
in some countries :-)
Simon.
--
Index: dtimep.lex
===================================================================
RCS file: /cvs/nmh/zotnet/tws/dtimep.lex,v
retrieving revision 1.1.1.1
diff -p -u -r1.1.1.1 dtimep.lex
--- dtimep.lex 1999/04/30 18:08:35 1.1.1.1
+++ dtimep.lex 2000/01/21 03:14:13
@@ -257,6 +257,13 @@ dparsetime (char *str)
for (i = 0; isdigit(*cp); )
i = i*10 + (*cp++ - '0');
tw.tw_year = i;
+ /* handle broken mua's that don't add 1900, or
+ just use the last two digits. Assume no
+ email before 1969. */
+ if (tw.tw_year < 69)
+ tw.tw_year += 100;
+ if (tw.tw_year < 1900)
+ tw.tw_year += 1900;
}
{D}"-"?{MONTH}({W}at)?{w} {
tw.tw_mday = CVT1OR2;