newnews y2k bug in 2.2.1

David C Lawrence tale at iengines.com
Tue Nov 16 01:53:33 UTC 1999


Forrest J. Cavalier III writes:
> I believe this was committed 8 January 1999 by tale.

Yes, I erred, there should have been a >=, not a >.

> Are saving a few CPU cycles so important?  Replace the
> test and subtraction with:
> 
>    current->tm_year %= 100;

No, but correctness is.  While it might be folly to think that code is
going to last until 2100, (at least I sure hope it is folly), I at
least value the notion that it will still work when 2100 hits.  Doing
a modulus won't.


More information about the inn-workers mailing list