RE: Y2K

From: Tom von Alten <Tom_vonAlten_at_boi.hp.com_at_hypermail-project.org>
Date: Fri, 9 Oct 1998 18:08:31 -0600
Message-Id: <01BDF3AF.E5BC6F40.Tom_vonAlten_at_boi.hp.com>


Byron Darrah wrote:
> PS: On the Y2K subject. If anyone wants a fairly simple date class for C
> or C++ that can add, subtract, convert to text, and parse dates reliably,
> I've got one at http://www.cs.ucla.edu/~darrah/date_t.tgz that you can
> try.

Well, the "parse dates reliably" is what's at issue here. The only parsing in your C version is for MM/DD/YYYY and MM/DD/YY. Would that life in email headers were that simple!

Here's my list of what kind of formats get stuffed in the "Date: " field, for example:

        Date:   Thu, 1 Oct 1998 11:30:31 +0100
        Date:   Tue, 22 Sep 1998 11:56:33 -0600
        Date:       Wed Sept. 30,1998
        Date:    01/10/98 11:07
        Date:    10/1/98 8:05 AM
        Date:    22.09.98 21:11
        Date:    9/22/98 4:54 PM
        Date:    9/7/98 19:07
        Date:    98/09/26 7:35 am
        Date:   Tue, 8 Sep 1998 15:40:11 +0200
        Date: Fri, 02 Oct 1998 03:49:13 -0600
        Date: Fri, 2 Oct 1998 02:15:14 -0600 (MDT)
        Date: Fri, 2 Oct 1998 07:01:14 -0600
        Date: Fri, 25 Sep 98 13:26:15 met
        Date: Mon, 28 Sep 98 11:01:25 +0900
        Date: Sun, 27 Sep 1998 22:31:51 +0200
        Date: Thursday, September 24, 1998 6:51AM

Not the least of the aggravations is the fact that October 1st, 1998 can be represented as 01/10/98 or 10/1/98.

hypermail is quite a bit more robust than it would be if it had to deal with all this, since the date it actually tries to parse is what's delivered in the "From " header line; for any given system and MTA, it should be determinate, although trying to make robust and portable source that works with a variety of systems and MTAs is the challenge.

_____________ Hewlett-Packard Computer Peripherals Bristol Tom von Alten mailto:Tom_vonAlten_at_boi.hp.com Received on Sat 10 Oct 1998 02:19:48 AM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:11 AM GMT GMT