W3C home > Mailing lists > Public > www-talk@w3.org > September to October 1996

Hypermail and leap year

From: Dave Kristol <dmk@allegra.att.com>
Date: Thu, 12 Sep 96 17:23:40 EDT
Message-Id: <9609122123.AA24140@zp>
To: www-talk@w3.org
I believe the C version of the popular Hypermail program
(<http://www.eit.com/software/hypermail/hypermail.html>), v.1.02 has a
bug handling some dates/times after Feb. 29, 1996.  Has anyone else
noticed and/or fixed it?

[N.B.  I sent email to the author but I have gotten no response.]

You can see the faulty behavior at
	<<http://www.bell-labs.com/www-buyinfo/archive/96Q3/index.html>
and I've also seen it in the HTTP-WG archives.  The starting and ending
times at the top of the page are broken, with the "seconds" field being
a large negative number.  The bug seems to be in the translation of
message header date fields to a long internally, then back to a printable
date.

I have spent a little time trying to locate the bug, unsuccessfully.
The most obvious fault is that in line 208 of date.c, the test is true,
and "yearsecs" becomes negative.  However, I suspect the real culprit
is getyearsecs().

Dave Kristol
Received on Thursday, 12 September 1996 17:27:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:19 GMT