🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1198

Re: Change to time() fn?

#1198
From: Karl Heuer
Date: Sun, 13 Sep 1992 18:45
21 lines
1710 bytes
In article <1992Sep12.140423.23672@iqsc.COM> matt@iqsc.COM (Matt Reedy) writes:
>And you're right, the number of seconds from that point to today is roughly
>60*60*24*365*92 which is 2.9 billion.
>
>The interesting thing about Microsoft's doc is that their example program
>calls this function, and does a printf("The number of seconds since 1/1/70:").
>So, which one is right, the comment or the sample program???

Assuming they implemented time_t as a signed 32-bit integer, didn't you just
finish agreeing with me that the documentation *cannot* be correct?

Of course, if you have access to this implementation, you could run the
sample program and do the arithmetic on the output value, and verify that
it does correspond to the 1970 Epoch.  My guess is that someone in charge
of documentation decided that an American audience would have trouble
understanding "00:00" and so attempted to change it to "midnight" (meaning
24:00) of the previous day; and this person managed to get 1899 when
subtracting one from 1970.  (Possibly through a typo, or by blindly assuming
that the "1970" in the original *must* have been a typo for 1900.)

Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint
Technical Details
Message-ID: <1992Sep13.184530.27370@ima.isc.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!hsdndev!ncar!ico!dirtydog.ima.isc.com!karl
References: <1992Sep11.194827.19500@iqsc.COM> <1992Sep12.042747.26773@ima.isc.com> <1992Sep12.140423.23672@iqsc.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!hsdndev!ncar!ico!dirtydog.ima.isc.com!karl
From: karl@ima.isc.com (Karl Heuer)
Newsgroups: comp.std.c
Subject: Re: Change to time() fn?
Message-ID: <1992Sep13.184530.27370@ima.isc.com>
Date: 13 Sep 92 18:45:30 GMT
References: <1992Sep11.194827.19500@iqsc.COM> <1992Sep12.042747.26773@ima.isc.com> <1992Sep12.140423.23672@iqsc.COM>
Sender: usenet@ima.isc.com (news)
Organization: Interactive Systems, Cambridge, MA 02138-5302
Lines: 21