[ntp:questions] ntpd oddness

Martin Burnicki martin.burnicki at meinberg.de
Wed Apr 2 07:58:38 UTC 2008


John Oliver wrote:
> I'm having a small issue with ntp-4.2.0.a.20040617-6.el4 running under
> Red Hat Enterprise Linux 4 update 5.
> In the Kickstart script to configure the server, I specify:
> timezone --utc GMT/London
> After the installation is done:
> [joliver at 0123456789-VCS ~]$ date
> Tue Apr  1 17:03:23 EDT 2008

What's the output of:

date -u; date

This shows both your system's UTC time and local time according to your time
zone configuration. Which of them is correct?

> [joliver at 0123456789-VCS ~]$ /sbin/hwclock
> Tue 01 Apr 2008 09:05:39 PM GMT  -0.323329 seconds
> [joliver at 0123456789-VCS ~]$ sudo /sbin/hwclock --systohc
> [joliver at 0123456789-VCS ~]$ /sbin/hwclock
> Tue 01 Apr 2008 09:05:52 PM GMT  -0.776568 seconds

Normally the system time is only initialized from the hwclock (the RTC chip
on the mainboard) at boot time, and when the system shuts down properely
the current system time should be written back to the hwclock. In most
cases you see this in the console messages.

If you have a dual/multi boot system then you must take care that all
operating systems assume the RTC to run at the same time, i.e. either local
time or UTC.

E.g. if you set the system time under Windows 2000 then the RTC will be set
to the current Windows local time. If you boot Linux afterwards you must
take care that Linux knows the correct local time offset of the RTC which
matches the Windows time zone offset. This may lead to a 1 hour offset if
you shut down the system during standard time and reboot it the next
morning after DST has started.

If the system is Linux only I'd suggest you configure your Linux system such
that the RTC chip keeps UTC time only. If then the time is not correct
after a reboot your on-board battery may be low.

Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont

More information about the questions mailing list