[ntp:questions] Re: NTPD 4 hours off date problem
xbntp at mailinator.com
Tue May 10 08:48:17 UTC 2005
David Schwartz a écrit :
> "X.B." <xbntp at mailinator.com> wrote in message
> news:d5npin$ir6$1 at s1.news.oleane.net...
>>The computer i'm using has no cmos battery, so each time it is cold
>>rebooted, the internal clock is set to something around 01-01-2000.
>>I've gone through the source code, and found that antenna's NTP packets
>>are thrown out (1) because the date they contain is more than 4 hours (
>>CLOSETIME 4*60*60 ) off the system date ... So ntpd refuse to set the
>>Alas, this 4 hours delay check cannot be disabled using -g
>>I couldn't find any reasonable solution to overcome this problem.
>>- ntpdate ( which seems to become obsolescent ) cannot work with the
>>acutime ( as far as i understand )
>>- i've no other time reference that the Gps antenna. So i cannot set the
>>date even aproximatively
>>- i cannot come and manually set an aproximative date each time the
>>computer gets cold-rebooted :)
> Just use a quick and dirty program to jump the system time based on the
> time from the GPS device. You want to run this program very early in your
> boot process.
I'm afraid that's what i'll do ... The 'best' ( ... ) to do so seems to
be to patch ntrpd somewhere, probably in clocktime.c ( removing the
check against CLOSETIME ) ...
I now nothing about the ntp(d) code in itself.
I'm thinking about making a better patch ( something like extending -g
effect to clocktime ) but that's if i've time enough.
More information about the questions