home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / std / c / 2620 < prev    next >
Encoding:
Internet Message Format  |  1992-09-13  |  1.6 KB

  1. Path: sparky!uunet!think.com!hsdndev!ncar!ico!dirtydog.ima.isc.com!karl
  2. From: karl@ima.isc.com (Karl Heuer)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Change to time() fn?
  5. Message-ID: <1992Sep13.184530.27370@ima.isc.com>
  6. Date: 13 Sep 92 18:45:30 GMT
  7. References: <1992Sep11.194827.19500@iqsc.COM> <1992Sep12.042747.26773@ima.isc.com> <1992Sep12.140423.23672@iqsc.COM>
  8. Sender: usenet@ima.isc.com (news)
  9. Organization: Interactive Systems, Cambridge, MA 02138-5302
  10. Lines: 21
  11.  
  12. In article <1992Sep12.140423.23672@iqsc.COM> matt@iqsc.COM (Matt Reedy) writes:
  13. >And you're right, the number of seconds from that point to today is roughly
  14. >60*60*24*365*92 which is 2.9 billion.
  15. >
  16. >The interesting thing about Microsoft's doc is that their example program
  17. >calls this function, and does a printf("The number of seconds since 1/1/70:").
  18. >So, which one is right, the comment or the sample program???
  19.  
  20. Assuming they implemented time_t as a signed 32-bit integer, didn't you just
  21. finish agreeing with me that the documentation *cannot* be correct?
  22.  
  23. Of course, if you have access to this implementation, you could run the
  24. sample program and do the arithmetic on the output value, and verify that
  25. it does correspond to the 1970 Epoch.  My guess is that someone in charge
  26. of documentation decided that an American audience would have trouble
  27. understanding "00:00" and so attempted to change it to "midnight" (meaning
  28. 24:00) of the previous day; and this person managed to get 1899 when
  29. subtracting one from 1970.  (Possibly through a typo, or by blindly assuming
  30. that the "1970" in the original *must* have been a typo for 1900.)
  31.  
  32. Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint
  33.