[ntp:questions] Re: NTP, Unix and the 34-year itch (better read this)
Terje Mathisen
terje.mathisen at hda.hydro.com
Thu Jan 22 22:19:06 UTC 2004
Rob MacGregor wrote:
> Terje Mathisen wrote:
>
>> Even if the TOY clock breaks (battery stops working after ~5-10
>> years), simply demanding that the initial time is >= the build time
>> would suffice.
>>
>> Alternatively, use the file system level timestamp of the ntpd deamon:
>
>
> How about the following...
>
> If the system date is (much) older than the creation date of the ntpd
> binary then look to the last modification date of the drift file as a
> reference.
I.e. outside the +/- 34 or 68 year window?
>
> As the drift file will be getting updated regularly anyway you don't
> have to modify anything external.
Very nice. :-)
>
> Of course, caution is advised with anything like this. What if somebody
> builds a system with the clock set 40 years into the future and then
> sets the date correctly when they next reboot it? I've already seen
> systems where the default date in the CMOS is wrong when you power the
> board up for the first time - I've even had one set for somewhere
> towards the end of this century.
You can't handle most of the typical faults automatically without
introducing new (but hopefully much lower probability) ways for the
system to fail. :-(
Terje
--
- <Terje.Mathisen at hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"
More information about the questions
mailing list