[ntp:questions] Re: using ntpd to initialise time instead of ntpdate sets wrong time.

Maarten Wiltink maarten at kittensandcats.net
Thu Apr 14 18:58:11 UTC 2005


"Patrick Varney" <patrick.varney at syntegra.bt.co.uk> wrote in message
news:HEw7e.867$q3.40102 at news7.onvoy.net...

> I've got an embedded linux machine whose initial time is 1, Jan, 1970.
> When I use ntpdate to set the correct time at boot time it does this
> correctly, but when I use ntpd to do this it sets the time backwards
> to 1937. The debug shows that the offset is seen as a negative value.
> The documentation suggests that ntpd -q can be used as a replacement
> for ntpdate.

This sounds like an effect of finite precision arithmetic that has been
discussed here; apparently we are now more than half a period away from
the epoch and ntpdate uses unsigned arithmetic in some crucial place
where ntpd doesn't.

Can you set the clock to 1 January 2000 just before the initial step?

Groetjes,
Maarten Wiltink





More information about the questions mailing list