[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Debian]:Re: y2k & Mutt: falsches sort-by-date bei zweistelliger "00"-Jahreszahl



Hi!

On Fre, Jan 07, 2000 at 05:46:14 +0100, Ulrich Schwarz wrote
> feststellen, dass auch dieser Mutt das sort-by-date-Problem bei 2stelliger
> Jahreszahl hat.  Weder auf der Mutt-Homepage noch mit Deja noch in den

Angehängte Mail incl. Patch ist aus der Mutt-Mailingliste.

Shade and sweet water!
	
	Stephan

-- 
| Stephan Seitz    E-Mail: rzsss@rzawb02.rz.uni-saarland.de |
|          WWW: http://fsing.fs.uni-sb.de/~stse/            |
| PGP Public Keys: http://fsing.fs.uni-sb.de/~stse/pgp.html |
--- Begin Message ---
[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;
 

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

Attachment: pgpau18WvJV3v.pgp
Description: PGP signature


--- End Message ---

Attachment: pgpo8NnuVPwmU.pgp
Description: PGP signature


Reply to: