Article View: news.software.nntp
Article #43455Re: Missing Skirvin? (was Re: Usenet: Predictions for the New Millenni
From: J. Moreno
Date: Mon, 17 Jan 2000 00:00
Date: Mon, 17 Jan 2000 00:00
50 lines
3294 bytes
3294 bytes
Martin Maney <maney@pobox.com> wrote:
> J. Moreno <planb@newsreaders.com> wrote:
> > Peter da Silva <peter@taronga.com> wrote:
> >> printf("...%d...", ...time->tm_year...);
> >>
> >> A program should never generate "100" for the year 2000, but a paranoid
> >> server should accept it.
>
> > I'm not sure that is what was meant, it seems to me that 3 would be
> > "000" (at least for the next hundred years, when it'd be "100").
>
> You haven't been paying attention to the Y2K bugs that actually surfaced,
> then. This is a classic one: many half-witted programmers have assumed, as
> you seem to be doing, that tm_year has the value of "year within century".
> It doesn't; the definition is "years since 1900", and while that may be
> dumb, it's the way it is.
No, I'm quite aware of what tm_year means, but that has nothing to do
with saying that the year can be 2-4 digits. I at least would assume
that it was allowing a different number of significant digits, and
looked at that way (which is the most sensible absent documentation
that you are changing the meaning of year in Date to be compatible with
tm_year, which is not what was said), "100" would never indicate 2000,
1900, 2200.
> This bug has shown up in quite a number of places, possibly starting
> in the Auckland airport's "Y2K is here and we're okay" letter that
> was originally posted with the date as 1/1/100. And I believe it is,
> in slightly altered form, also responsible for a widely reported
> "01/01/10" produced by many (?) C-shell variants.
>
> In fact, if you consider the timestamp to be a simple ASCII representation
> of parts of the underlying Standard C time structure, you would expect to
> get amd accept "100" this year. :-)
But it's not, and so I wouldn't consider it as such.
> > Which is just what I meant -- a good server that was programed to last
> > a long time would assume that "100" meant 2100.
>
> Heavens, no. What would it do come 3100 in that case? :-) :-)
Gotta leave some bugs for the great, great, great, great....grandkids.
--
J. B. Moreno
Pessimist: Half empty Optimist: Half full Engineer: Wrong size glass
Technical Details
Message-ID:
<170120001135137433%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.admin.misc.mbox.zip!not-for-mailReferences:
<slrn86q6s4.i49.grobe+news@worf.netins.net> <090120000152491732%planb@newsreaders.com> <7Wv1XHXXw-B@khms.westfalen.de> <150120001630026098%planb@newsreaders.com> <85rer6$2p8q$1@citadel.in.taronga.com> <150120002312459367%planb@newsreaders.com> <85t6q7$o4d$1@wheel.two14.lan>Show Full Headers
Complete Article Headers
Message-ID: <170120001135137433%planb@newsreaders.com> Subject: Re: Missing Skirvin? (was Re: Usenet: Predictions for the New Millenni Date: Mon, 17 Jan 2000 00:00:00 +0000 From: "J. Moreno" <planb@newsreaders.com> References: <slrn86q6s4.i49.grobe+news@worf.netins.net> <090120000152491732%planb@newsreaders.com> <7Wv1XHXXw-B@khms.westfalen.de> <150120001630026098%planb@newsreaders.com> <85rer6$2p8q$1@citadel.in.taronga.com> <150120002312459367%planb@newsreaders.com> <85t6q7$o4d$1@wheel.two14.lan> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.admin.misc.mbox.zip!not-for-mail X-Deja-AN: 573799261 Content-Transfer-Encoding: 8bit Mail-Copies-To: nobody Content-Type: text/plain; charset=ISO-8859-1 X-Face: ]lUBtDImSD_`E"<*ZgyJUoCT\=CdRLFX4qCMLK[xy^L7v|uX|f8`cFDd*PaH8 N*x>d^h Organization: BOFH wannabe Mime-Version: 1.0 User-Agent: YA-NewsWatcher/5.0.0b11 Newsgroups: news.admin.misc,news.software.nntp