home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / std / c / 2627 < prev    next >
Encoding:
Text File  |  1992-09-14  |  1.9 KB  |  36 lines

  1. Newsgroups: comp.std.c
  2. Path: sparky!uunet!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!jit345.bad.jit.dec.com!diamond
  3. From: diamond@jit345.bad.jit.dec.com (Norman Diamond)
  4. Subject: Re: Change to time() fn?
  5. Message-ID: <1992Sep15.042120.27559@nntpd.lkg.dec.com>
  6. Sender: usenet@nntpd.lkg.dec.com (USENET News System)
  7. Reply-To: diamond@jit.dec.com (Norman Diamond)
  8. Organization: Digital Equipment Corporation Japan , Tokyo
  9. References: <1992Sep11.194827.19500@iqsc.COM> <1992Sep12.042747.26773@ima.isc.com> <1992Sep12.140423.23672@iqsc.COM> <1992Sep13.184530.27370@ima.isc.com>
  10. Date: Tue, 15 Sep 1992 04:21:20 GMT
  11. Lines: 23
  12.  
  13. In article <1992Sep13.184530.27370@ima.isc.com> karl@ima.isc.com (Karl Heuer) writes:
  14. >In article <1992Sep12.140423.23672@iqsc.COM> matt@iqsc.COM (Matt Reedy) writes:
  15. >>And you're right, the number of seconds from that point to today is roughly
  16. >>60*60*24*365*92 which is 2.9 billion.
  17. >>
  18. >>The interesting thing about Microsoft's doc is that their example program
  19. >>calls this function, and does a printf("The number of seconds since 1/1/70:").
  20. >>So, which one is right, the comment or the sample program???
  21. >
  22. >Assuming they implemented time_t as a signed 32-bit integer, didn't you just
  23. >finish agreeing with me that the documentation *cannot* be correct?
  24.  
  25. Even if they implemented time_t as a 32-bit integer, I cannot imagine why
  26. it should be signed.  (time_t)-1 does not have to be negative, the standard
  27. carefully recognized that, and some implementors have occasionally been
  28. known to recognize similar opportunities for various kinds of tricks.
  29.  
  30. From the discussion that has appeared in this newsgroup, it sounds like the
  31. documentation is *unlikely* to be correct, but it *can* be.
  32. --
  33. Norman Diamond       diamond@jit081.enet.dec.com
  34. If this were the company's opinion, I wouldn't be allowed to post it.
  35. "Yeah -- bad wiring.  That was probably it.  Very bad."
  36.