[ntp:questions] Automatic time synchronization of local hw clock.
stenn at ntp.org
Mon Apr 14 19:45:56 UTC 2014
> On 14.04.2014 13:01, Harlan Stenn wrote:
> > I would expect ntpd -q to correct the system clock, not the BIOS clock.
> So ntpd has nothing to do with hardware clock.
> >> >This is the command line which starts ntpd as service:
> >> >
> >> >/srv/ntpd/bin/ntpd -p /var/run/ntpd.pid -g -l /srv/ntpd/log/ntpd.log -s
> >> >/srv/ntpd/log/ntpstats/ -c /srv/ntpd/etc/ntpd.conf -u
> > OK, thanks - that looks good.
> Yes, but -g option didn't prevent ntpd to fail when system time
> difference was 1 hour.
I would like to see the log files for that situation. I suspect a
different problem. When -g is given we allow the maximum possible time
adjustment for the initial time correction. Only after that has been
done do we re-enable the "panic limit" that defaults to 1000 seconds.
> > You might want to consider running a cron job from time to time to set
> > the BIOS clock from the system clockc, if ntpd is not updating the BIOS
> > clock for you.
> Well, I added a cron job like this:
> 0 * * * * root /sbin/hwclock -w --localtime
> for every hour.
NTP uses UTC, not localtime. So at startup, if the OS sets the clock
using the BIOS clock it will use localtime instead of UTC, and in 23 out
of 24 areas of the world, that will be different from UTC.
More information about the questions