Article View: comp.std.c
Article #1202Re: Change to time() fn?
From: Norman Diamond
Date: Tue, 15 Sep 1992 04:21
Date: Tue, 15 Sep 1992 04:21
23 lines
1931 bytes
1931 bytes
In article <1992Sep13.184530.27370@ima.isc.com> karl@ima.isc.com (Karl Heuer) writes:
>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?
Even if they implemented time_t as a 32-bit integer, I cannot imagine why
it should be signed. (time_t)-1 does not have to be negative, the standard
carefully recognized that, and some implementors have occasionally been
known to recognize similar opportunities for various kinds of tricks.
From the discussion that has appeared in this newsgroup, it sounds like the
documentation is *unlikely* to be correct, but it *can* be.
--
Norman Diamond diamond@jit081.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
"Yeah -- bad wiring. That was probably it. Very bad."
Technical Details
Message-ID:
<1992Sep15.042120.27559@nntpd.lkg.dec.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!jit345.bad.jit.dec.com!diamondReferences:
<1992Sep11.194827.19500@iqsc.COM> <1992Sep12.042747.26773@ima.isc.com> <1992Sep12.140423.23672@iqsc.COM> <1992Sep13.184530.27370@ima.isc.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!jit345.bad.jit.dec.com!diamond From: diamond@jit345.bad.jit.dec.com (Norman Diamond) Subject: Re: Change to time() fn? Message-ID: <1992Sep15.042120.27559@nntpd.lkg.dec.com> Sender: usenet@nntpd.lkg.dec.com (USENET News System) Reply-To: diamond@jit.dec.com (Norman Diamond) Organization: Digital Equipment Corporation Japan , Tokyo References: <1992Sep11.194827.19500@iqsc.COM> <1992Sep12.042747.26773@ima.isc.com> <1992Sep12.140423.23672@iqsc.COM> <1992Sep13.184530.27370@ima.isc.com> Date: Tue, 15 Sep 1992 04:21:20 GMT Lines: 23