[10298] in www-talk@info.cern.ch
Hypermail and leap year
daemon@ATHENA.MIT.EDU (Dave Kristol)
Thu Sep 12 17:35:29 1996
Date: Thu, 12 Sep 96 17:23:40 EDT
From: dmk@allegra.att.com (Dave Kristol)
To: www-talk@w3.org
Resent-From: 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