[ntp:hackers] Comments invited

Terje Mathisen terje.mathisen at hda.hydro.com
Mon Dec 29 13:58:24 PST 2003


Tim Shoppa wrote:

>>The date of the epoch could shift (although I'm sure
>>this breaks POSIX or ANSI something-or-other).
> 
> 
> * No, the epoch really cannot change! :-)
> 
> Historically, the first versions of Unix stored time as the number of
> sixtieths of a second since the beginning of the current year.  The
> whole system had to be recompiled each year if anything cared about
> the exact year.  Not much did, most programs that accepted or
> displayed a data just never showed the year.
> 
> There was a table that selected whether the current (and only!) year
> was a leap year or not.

OK, OK, I'm convinced. :-)
> 
> The current number-of-seconds-since-1970 is a comparative latecomer
> to the Unix/C game.

One that you won't be able to move, IMHO.
> 
> Standards *will* change again before 2038, I hope :-)

Many systems have already made that change, by first defining time_t, 
and then making it more than 32 bits.

I'll give 10:1 odds of this becoming the the-facto solution for the 
remainder as well.

Anyway, should we avoid all this by using the daynr+hms stuff I've written?

Terje
-- 
- <Terje.Mathisen at hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"




More information about the hackers mailing list