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

Mimiko vbvbrj at gmail.com
Tue Apr 22 11:07:23 UTC 2014


Hello.

I didn't reply on messages a long time. This thread became quite 
interesting. Indeed it is a very complicated thing in to agree on which 
time to run the system and RTC. Mostly because of windows, which follows 
there own standards.

Meanwhile I did some tests on a windows xp system configured as a domain 
workstation. The time service is configured from domain controller to 
synchronize with local time server running on ntpd on linux.

I started from a running system and synchronized time with the time 
server. I changed the time with the GUI to some 15 mins ago. Windows 
immediately changed it back. Then I pulled out network cable a did same 
thing. Windows didn't change the time back. Then I unplugged the power 
cord so windows will not have regular power down cycle. Then started 
computer and entered the BIOS. The time was at the value I manually set 
15 mins back. Then allowed system to boot without network cable. Windows 
didn't react. Then I plugged in network cable, windows synchronized the 
time and I unplugged power cord and entered BIOS again. The RTC clock 
was also synchronized.

I can conclude that windows adjust RTC clock if it is different from 
time server within some threshold. May be no more that a minute. The 
test was done using localtime in BIOS and in windows setting. No other 
system is on this station.

About DST correction, I remember a dual boot of two windows versions. It 
had same pain, when one windows changed time with 1 hour and remembered 
about this. The other windows knows that it must change time also. So 
time was adjusted twice. This was happening when computer didn't have 
access to some time server. If there is access to time server, windows 
adjusts RTC in concordance with time server in UTC +- local time 
difference +-DST, regardless if the RTC was changed by other system. So, 
in case of dual boot with windowses and time server access, there is no 
problem for windows to set RTC. Windows will always set RTC clock from 
time server with local time difference, but if RTC is not set to some 
maximal threshold allowed.

I didn't mention that I have a dual boot of linux and windows. I just 
gave an example. In my case the linux box is the only system it is 
running. And on this linux box ntpd is acting as time server. I 
described why there was a 1 hour difference of RTC clock. But I don't 
understan why ntpd quited with "-g" option.

Asking about some much trouble in time keeping in linux, I meant about 
not having a out of the box time synchronization with some server on 
internet, like windows do. Also, having RTC time set only on linux 
shutdown breaks correct time on next boot if system was interrupted from 
power suddenly. This is not much problem for regular workstation when 
normal shutdown is done regularly, but is a problem when system is set 
to sleep (for notebooks) or for servers when they run for months or 
years until a power outage occurs. Also 11 minutes kernel mode to 
correct RTC may break without any notice by some program or service. 
Thats why for now I came with cron job to adjust time.

I think, that RTC set to local time is more usual, than to UTC, 
especially for workstations. But servers may be also run on local time. 
Despite I am an administrator to systems for years, I never had problems 
in which local time is set RTC clock. Mostly because I worked with 
windows workstations and servers. But I did know about the problem of 
synchronization.

There are a lot of windows administrators, mostly for workstations or 
PC, which enters BIOS to set it up for system. Mostly they set time to 
local time, without knowing about what UTC means. They know to set RTC 
correct, then set windows to local time during setup.

Unless windows agrees on standardizing RTC clock to be always in UTC, 
and release a patch (for vista+ now) and newsbuletin about this to all 
system administrators, linux and macs will have problems on dual boot 
with windowses.

Thank you all about lot of info about time handling on different systems 
described in this thread.

-- 
Mimiko desu.


More information about the questions mailing list