[ntp:questions] Automatic time synchronization of local hw clock.

David Taylor david-taylor at blueyonder.co.uk.invalid
Tue Apr 22 10:00:18 UTC 2014

On 22/04/2014 10:44, Martin Burnicki wrote:
> David Taylor wrote:
>> On 16/04/2014 14:50, Martin Burnicki wrote:
>> []
>>> However, when the NTP service is shut down then it stops disciplining
>>> the system time anyway and thus calls the Windows API which sets the
>>> time with the current time as new time. This should force Windows to
>>> update the time in the RTC chip.
>> []
>>> Martin
>> I understood that it was when Windows shut down that NTP set the RTC
>> chip, not when the service was shut down.  I've not looked at the code
>> (I wouldn't know where to start) to confirm this one way or the other,
>> though.
> Indeed this seems to have changed in 4.2.6 and current ntp-dev. The
> Windows port of ntpd now only sets the system time if it was
> synchronized before, and if it is shutdown because the whole system is
> shutdown.
> The code is still in current current ntp-dev, in nt_clockstuff.c around
> line 850.
> (David, sorry for the personal reply I sent accidentally before)
> Martin

No proble, here's the reply I sent back, before seeing the messages 
here.  Hope it formats correctly.  It seems that regular syncing is 
definitely not desirable, and I am uncertain about service restarts.

Yes, line 894 in 4.2.7p440.

I must confess I've been having doubts about this.  I wondered whether 
it had been removed because getting and then setting the system time had 
some other undesirable side-effect e.g. when restarting the service, 
such as only setting the time to the nearest 16 milliseconds when it 
might have been much better before that.  If Windows is crashing rather 
than in a controlled shutdown, perhaps the BIOS clock shouldn't be set?

I don't have the time to perform these tests, so I am inclining more
towards: "If it works, leave it".  I would welcome the views of others,

Dave Hart seems completely out of the scene (I don't know why other than 
he had moved across the US), and he's likely the one who made the 
change, and could tell us why.

Web: http://www.satsignal.eu

More information about the questions mailing list