[ntp:questions] ntpd sets clock to the year 1939

Robert Dodier robert.dodier at gmail.com
Tue Mar 27 16:55:23 UTC 2007


On Mar 27, 9:04 am, "Richard B. gilbert" <rgilber... at comcast.net>
wrote:

> >>It's hardly ever a problem since most systems have a hardware clock of
> >>some sort that can supply a reasonable starting point.  In 2007, I don't
> >>think that 1970-is a reasonable starting point.

I dunno. Zero is a pretty common default value.
I'm not surprised the device I'm working with boots up with that date.

> The opposite argument would be that it's not reasonable for ntpd to make
> a "leap of faith" and jump the time by 36 years!

No need for a leap of faith. Jumps larger than the sanity limit
are authorized by the -g option.

> Ntpd is designed to consider a clock that's off by 1024 seconds or
> more as a situation it is not equipped to handle.

Except as modified by the -g option. Let's see what the man page
for ntpd says about that:

-------------- begin quoted text about ntpd -g --------------
Normally, ntpd  exits if the offset exceeds the sanity limit, which is
1000 s by default. If the sanity limit is set to zero, no sanity
checking
is performed and any offset is acceptable.  This option  overrides the
limit and allows the time to be set to any value without restriction;
however, this can happen only once.  After that, ntpd  will exit if
the
limit  is  exceeded. This option can be used with the -q  option.
--------------- end quoted text about ntpd -g ---------------

It says "any offset", not "any offset less than 30 years".

> Ntpd is behaving as it's designed and documented to behave.

I don't know about the design, but in fact it's documented to behave
otherwise.I searched the ntp documentation and could not find any
mention of the 30-year limitation. It certainly should be in the man
page for ntpd, if it's anywhere.

> The source is available and anyone with the necessary skills can modify
> it to handle special cases like this.  Anyone lacking the necessary
> skills can pay someone with the skills to do the work.

Or someone lacking necessary skills can make noise about it
and hope than someone else will get motivated to work on it.
Other people do this to me all the time. I don't see anything
wrong with it. It's often called a request for enhancement.

But maybe it would be enough to just mention the 30 year
limitation in the documentation.

FWIW
Robert Dodier




More information about the questions mailing list