Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Feb 2011 11:42:19 +0000
From:      Matthew Seaman <>
Subject:   Re: system clock running 2h early although ntpd enabled
Message-ID:  <>
In-Reply-To: <20110211221648.03c65a04@dijkstra>
References:  <20110211221648.03c65a04@dijkstra>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 11/02/2011 21:16, Christopher J. Ruwe wrote:
> Since some weeks my local clock runs two hours early. My /etc/localtime=

> is a copy of /usr/share/zoneinfo/Europe/Berlin and I have set both
> ntpd_enable=3D"YES" and ntpd_sync_on_start=3D"YES". My ntp.conf consist=
s of=20
> server prefer
> server
> restrict default ignore
> restrict
> Surely, I must be missing something. Does anybody have an idea?

Sounds like your CMOS clock is set to local wallclock time, but you
haven't got the /etc/wall_cmos_clock file.  Or vice-versa: your CMOS
clock is set to UTC, but you've got the wall_cmos_clock file.  See
adjkerntz(8) for details.  The CMOS clock is what drives the time/date
display shown in the system BIOS, and it's separate from the clock used
for the system time when the OS is running.

On unix systems, the system clock always runs in UTC, and an appropriate
offset will be calculated for your timezone whenever you want to display
the time.

ntpd will synch your system clock to UTC, except that on reboot the
systems' initial concept of what time it is comes from the CMOS clock,
possibly offset by a certain number of hours if it thinks the CMOS clock
is using local wall-clock time.  Now, if the kernel is mistakenly
applying a timezone correction, it can put the system clock outside the
sanity check offset that ntpd uses, so ntpd may never synch to the right
time.  As suggested elsethread, you can use the '-g' flag to ntpd to
force it to always synch on startup even if the time is way out.  Even
so it helps your system stabilise a bit faster after reboot if your
kernel can derive something more like the right system time from the
CMOS clock.

Personally, if the machine is dedicated to running FreeBSD (or FreeBSD
and other unixoid OSes) I'd set the CMOS clock to UTC[*] and remove
/etc/wall_cmos_clock.  Otherwise (ie. if you need to boot into Windows)
do it the other way: set the CMOS clock to local wall clock time and
make sure /etc/wall_cmos_clock exists.



[*] Well, considering where I live, for half the year this is a null op
in any case...

Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
JID:               Kent, CT11 9PW

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla -



Want to link to this message? Use this URL: <>