Some Comments & Questions about ANS
mcdonald at uxe.cso.uiuc.edu
mcdonald at uxe.cso.uiuc.edu
Wed Jun 14 22:39:00 AEST 1989
>time_t doesn't have to be an integer count of seconds.
Apparently that is true.
>In fact, on MS-DOS
>machines time_t looks pretty much like this:
>Bits: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
>Low word: | HOURS | MINUTES | SECONDS/2 |
>High word: | YEARS-1980 | MONTHS | DAYS |
In Microsoft C, time_t is defined as a long.
The "time()" function returns the number of seconds elapsed since
0:0:0 GMT, Jan 1, 1970 , as a time_t.
(Frankly, I don't see how this can work correctly, since there is
no editable system table of leap seconds. Perhaps it has an internal
one up to when the compiler was released, but a correct implementation
MUST have an editable leap second table since leap seconds are
not predictable in advance. Perhaps they are assuming that the
system clock will be set wrong!)
Doug McDonald
More information about the Comp.lang.c
mailing list