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

Richard B. gilbert rgilbert88 at comcast.net
Tue Mar 27 17:30:17 UTC 2007


Robert Dodier wrote:
> 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.
> 

Did you start it with 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.
> 

Then perhaps the documentation needs to be updated!  The 36 year "epoch" 
  (if that's the proper term) has been discussed before on this 
newsgroup although not recently.  Perhaps because it's rare for anyone 
to start ntpd with a clock that's off by 37 years!  I think you may be 
the only person to report such a problem in the four years or so that 
I've been reading this newsgroup!

Perhaps a startup script that sets the date to 1-JAN-2007 before 
starting ntpd would put a band-aid on the problem.


<snip>






More information about the questions mailing list