Simon Burge <[EMAIL PROTECTED]> writes:
> 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 :-)

Are you serious??  What countries have patent claims like that?  Never heard
of this issue...

> 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;

If it were me I might be tempted to make this behavior controllable (with
the default to do your adjustment).  It's feasible that a MUA could have a
different bug making the year be "00" (not just during the year 2000), so
the adjustment wouldn't be correcting the error, just changing it to be a
different one (which could lead to misleading bug reports on those MUAs).

Also someone might be doing something bizarre like OCR'ing in a bunch of
written correspondence (so they could throw away the hardcopies) and making
them into fake MH messages.  That correspondence might extend before 1900.
I know, a pretty unlikely scenario (though, in a similar vein, if I were
moving files off of obsolete computer systems, I would want to use 'touch'
to restore their original dates, if whatever transfer protocol I was using
didn't do so).

Speaking of old years, if you wanted to, you could change your year 1969 to
1972, when email was invented.

-----------------------------------------------------------------------
Dan Harkless                   | To prevent SPAM contamination, please 
[EMAIL PROTECTED]      | do not post this private email address
SpeedGate Communications, Inc. | to the USENET or WWW.  Thank you.     

Reply via email to