Article View: news.software.nntp
Article #17829Year 2000 problems in (at least) INN1.4 unoff 4
From: Della Lu
Date: Sat, 17 May 1997 00:00
Date: Sat, 17 May 1997 00:00
44 lines
1699 bytes
1699 bytes
catmega@MCS.COM (CatMega) writes:
> Is it safe to assume that 00 will be valid for the yy portion of
> date specifications for the above?
Not in INN 1.4 unoff 4 at least. They would need to change NNTPtoGMT
from:
for (seconds = 0, year += 1900, i = 1970; i < year; i++)
seconds += DaysInYear(i);
to something like:
for (seconds = 0, year += year<96?2000:1900, i = 1970; i < year; i++)
seconds += DaysInYear(i);
Or something fancier if you think INN will last longer than 98 years.
parsedate() will also fail due to a problem with Convert(),
RelativeMonth() will fail very badly due to the interaction between
that Convert() problem interacting with DSTcorrect().
Convert() should be changed from:
if (Year < 0)
Year = -Year;
if (Year < 100)
Year += 1900;
if (Year < EPOCH)
Year += 100;
to something like:
if (Year < 0)
Year = -Year;
if (Year < 100)
Year += Year<96?2000:1900;
if (Year < EPOCH) /* struct tm years */
Year += 1900;
--
Della Lu
Technical Details
Message-ID:
<4NGC5AtjvAE@hana.demon.co.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<5l5p7p$gtp$1@Mars.mcs.net>Show Full Headers
Complete Article Headers
Message-ID: <4NGC5AtjvAE@hana.demon.co.uk> Subject: Year 2000 problems in (at least) INN1.4 unoff 4 Date: Sat, 17 May 1997 00:00:00 +0000 From: Della Lu <dellalu@hana.demon.co.uk> References: <5l5p7p$gtp$1@Mars.mcs.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 242149220 X-Mail2News-Path: punt-2.mail.demon.net!hana.demon.co.uk X-Mail2News-User: news@hana.demon.co.uk X-Read-In: news.software.nntp Newsgroups: news.software.nntp