From owner-freebsd-questions@FreeBSD.ORG Sat Feb 12 11:43:49 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2BDC1065673 for ; Sat, 12 Feb 2011 11:43:49 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 142818FC1A for ; Sat, 12 Feb 2011 11:43:48 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id p1CBgRNZ095291 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sat, 12 Feb 2011 11:43:43 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk p1CBgRNZ095291 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1297511023; bh=MXckFuqx5QtuBQjo3sxKtC6NB+/cufE7//gdDXEz5Lk=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4D56721B.3080204@infracaninophile.co.uk>|Date:=20S at,=2012=20Feb=202011=2011:42:19=20+0000|From:=20Matthew=20Seaman= 20|User-Agent:=20Mozilla/5.0=20(M acintosh=3B=20U=3B=20Intel=20Mac=20OS=20X=2010.6=3B=20en-US=3B=20r v:1.9.2.13)=20Gecko/20101207=20Thunderbird/3.1.7|MIME-Version:=201 .0|To:=20freebsd-questions@freebsd.org|Subject:=20Re:=20system=20c lock=20running=202h=20early=20although=20ntpd=20enabled|References :=20<20110211221648.03c65a04@dijkstra>|In-Reply-To:=20<20110211221 648.03c65a04@dijkstra>|X-Enigmail-Version:=201.1.1|OpenPGP:=20id=3 D60AE908C|Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha1= 3B=0D=0A=20protocol=3D"application/pgp-signature"=3B=0D=0A=20bound ary=3D"------------enig64B858C008A516B3982421FB"; b=mN22jFybpin0WLNBNC2I6CEwXG6NNwgb6dOr7X8eq70Xnd06/nJLjgtsTV0vgvYRB 4GjbFbzQ5xeq7ZklSaOFV7LpK4xDvDphmEJc3Q8HaVN+mdRKmXyMmiTQwek2jrF5Ax GnCpbTfNjweUdyYb5tISLPO27UAbI+5Y/EF91vEY= Message-ID: <4D56721B.3080204@infracaninophile.co.uk> Date: Sat, 12 Feb 2011 11:42:19 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <20110211221648.03c65a04@dijkstra> In-Reply-To: <20110211221648.03c65a04@dijkstra> X-Enigmail-Version: 1.1.1 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig64B858C008A516B3982421FB" X-Virus-Scanned: clamav-milter 0.96.5 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lucid-nonsense.infracaninophile.co.uk Subject: Re: system clock running 2h early although ntpd enabled X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Feb 2011 11:43:49 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig64B858C008A516B3982421FB 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 >=20 > server ntp1.ptb.de prefer > server ntp2.ptb.de > restrict default ignore > restrict 127.0.0.1 >=20 > Surely, I must be missing something. Does anybody have an idea? >=20 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... --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig64B858C008A516B3982421FB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1WciMACgkQ8Mjk52CukIwtTgCfW78A0bG+WXmLWYUQe9nbZsRR O8EAninUltsI7VQyABj93ksNNPqYpOJp =ZrFm -----END PGP SIGNATURE----- --------------enig64B858C008A516B3982421FB--