Thomas Roessler writes:
> [Given that there have been several people asking for this recently,
> I'm reposting this message. I guess I should start to release
> 1.0.1...]
>
> 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;
I'm not sure about the if (tm.tm_year < 70) part. According the UNIX98
specification by The Open Group, which has been adopted by all major
Unix vendors, two-digit years 69-99 refer to the 20th century (19xx),
and 00-68 refers to the 21st century (20xx), so I think this line of code
should really read
if (tm->tm_year <= 68)
tm->tm_year += 100;