🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #56292

Re: slrn y2k bug?

#56292
From: Curt Welch
Date: Mon, 03 Jan 2000 00:00
78 lines
4948 bytes
planb@newsreaders.com (J. B. Moreno) wrote:
> <greg@apple2.com> wrote:
>
> > planb@newsreaders.com (J. B. Moreno) wrote:
> >
> > > I don't think so -- most/all current software will have been
> > > replaced, with the lesson learned; when dealing with two digit years,
> > > you need to take into account the century.
> >
> > And here I was thinking the lesson was to always deal with all digits
> > of the year (currently 4).
>
> No, that's clumsy when dealing with people.

This is a computer protocol we are talking about.

> > Isn't there a working group for an update to NNTP already?  If so, what
> > do they say on this issue?
>
>             A list of newsgroups created since <date and time> MUST be
>             listed in the same format as the LIST command.
>
>             The date is sent as 6 or 8 digits in the format [XX]YYMMDD,
>             where XX is the first two digits of the year, YY is the last
>             two digits of the year, MM is the two digits of the month
>             (with leading zero, if appropriate), and DD is the day of
>             the month (with leading zero, if appropriate). If the first
>             two digits of the year are not specified, the year is to be
>             taken from the current century if YY is smaller than or
>             equal to the current year, otherwise the year is from the
>             previous century.

This is the same wording as the August 1998 document I have in front of
me.

DATE/NEWNEWS/NEWGROUPS should all use 4+ digit years so there's no
confusion.  It's stupid to argue that the 2 digit format should remain the
"correct" way to do it.  Clients and servers will just have to deal with
the backward compatibility issues for awhile (including the 100->2000 bug
caused but trying to do a "%2d" of tm->tm_year on Unix) as shown at the
beginning of this thread.

There's just too much confusion about the "correct" way to interpret a 2
digit year as has been seen in this thread.  Even when the RFCs try to
document it, people get confused about it.

And, as seen in the quote above, the RFCs don't always pick the correct
solution anyway.  The 100 year "window" specified by the 2 year format
needs to have at least _some_ of that period extend into the future to deal
with the problems caused when the client and server clocks out out of sync.

For example, a client (with it's timzone set wrong), could send a 00 year
to a server when the server still thinks it's 1999.  According to the RFC,
the server _should_ interpret that date as 1900.  And that causes the
server to dump a huge list of articles to the client - a very bogus thing
to do.

Now, if the client only used the DATE command from the server to determine
the date (the correct thing to do), then this is even less likely to
happen, but could still happen if the clock on the server was changed just
at the right (wrong) time (say for Y2K testing).

The better algorithm here would be to just make the 100 year window
centered over the current time.  It's not like we need that extra 50 years
into the past for NEWNEWS commands.

But this just points out how the 2 digit year makes things a lot more
complex than they need to be and for no good reason.  In addition to the
complexity, it's also a typical class of bugs that tend not to be found
until years after the code is written.  Clearly, everyone should just
switch to a 4 digit year format so we don't have to deal with this again
for 8K years.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <20000103153338.145$1T@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn86sblt.poo.soma@amanda.dorsai.org> <84ledf$7q0$1@panix7.panix.com> <slrn86sund.7p1.davis@aluche.mit.edu> <slrn86timk.68q.boojum@localhost.localdomain> <yl3dsge0kg.fsf@windlord.stanford.edu> <1e3szek.esyit315td5czN%planb@newsreaders.com> <ylbt733heo.fsf@windlord.stanford.edu> <1e3t0kv.1nqyxkp1o4mbirN%planb@newsreaders.com> <ylogb31you.fsf@windlord.stanford.edu> <greg-487809.01330803012000@news.binary.net> <1e3tsdh.dhzw77p2qc82N%planb@newsreaders.com> <greg-B27D0D.11533903012000@news.binary.net> <1e3u3xu.egjhnwlhbi3kN%planb@newsreaders.com>

Show Full Headers
Complete Article Headers
Message-ID: <20000103153338.145$1T@newsreader.com>
Subject: Re: slrn y2k bug?
Date: Mon, 03 Jan 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <slrn86sblt.poo.soma@amanda.dorsai.org> <84ledf$7q0$1@panix7.panix.com> <slrn86sund.7p1.davis@aluche.mit.edu> <slrn86timk.68q.boojum@localhost.localdomain> <yl3dsge0kg.fsf@windlord.stanford.edu> <1e3szek.esyit315td5czN%planb@newsreaders.com> <ylbt733heo.fsf@windlord.stanford.edu> <1e3t0kv.1nqyxkp1o4mbirN%planb@newsreaders.com> <ylogb31you.fsf@windlord.stanford.edu> <greg-487809.01330803012000@news.binary.net> <1e3tsdh.dhzw77p2qc82N%planb@newsreaders.com> <greg-B27D0D.11533903012000@news.binary.net> <1e3u3xu.egjhnwlhbi3kN%planb@newsreaders.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 567885165
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.readers