home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!sdd.hp.com!swrinde!dptspd!iquery!matt
- From: matt@iqsc.COM (Matt Reedy)
- Newsgroups: comp.std.c
- Subject: Re: Change to time() fn?
- Message-ID: <1992Sep12.140423.23672@iqsc.COM>
- Date: 12 Sep 92 14:04:23 GMT
- References: <1992Sep11.194827.19500@iqsc.COM> <1992Sep12.042747.26773@ima.isc.com>
- Organization: IQ Software Corp.
- Lines: 26
-
- In article <1992Sep12.042747.26773@ima.isc.com> karl@ima.isc.com (Karl Heuer) writes:
- >ANSI doesn't specify that time() even *has* a "base value".
- >
- >POSIX says that it's measured in seconds since the Epoch, but since the
- >number of seconds since 1899-12-31 is already more than the common value of
- >LONG_MAX, I doubt that they've moved the Epoch backwards like that.
- >
- >Are you sure you're talking about the internal encoding of |time()|, and not
- >the |struct tm| representation? (That *does* have an (unfortunate) base of
- >1900 for the |tm_year| component.)
-
- Yes, it is the |time_t| value returned by |time()| that I'm looking at.
- It specifically says it is the number of seconds since midnight on
- Dec 31, 1899. 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???
-
- matt
- --
- Matthew Reedy UUCP: uunet!iquery!matt
- IQ Software Corporation Internet: matt@iqsc.COM
- 400 N Loop 1604 E, Suite 100
- San Antonio, TX 78232 (512) 490 6684 Fax: (512) 490-3590
-