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="YES" and ntpd_sync_on_start="YES". My ntp.conf consists of > > server ntp1.ptb.de prefer > server ntp2.ptb.de > restrict default ignore > restrict 127.0.0.1 > > 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. Cheers, Matthew [*] 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: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW
signature.asc
Description: OpenPGP digital signature