From owner-freebsd-stable@FreeBSD.ORG Sun Oct 28 15:56:04 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A8E616A420 for ; Sun, 28 Oct 2007 15:56:04 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id B210F13C48A for ; Sun, 28 Oct 2007 15:56:02 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id CAA21605; Mon, 29 Oct 2007 02:17:45 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 29 Oct 2007 02:17:44 +1100 (EST) From: Ian Smith To: Eugene Grosbein In-Reply-To: <20071028083955.GA69713@svzserv.kemerovo.su> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Peter Jeremy , stable@freebsd.org Subject: Re: CMOS, daylight saving time and dual-boot X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2007 15:56:04 -0000 On Sun, 28 Oct 2007, Eugene Grosbein wrote: > I have dual-boot machine with 7.0-BETA1 and Windows > that keeps CMOS time local (there is /etc/wall_cmos_clock also). > > It was tuned off yesterday evening and turned back on today, > loading FreeBSD. Meantime the switch from Summer Time to Standard Time > has ocurred. There is 'ntpd_enable="YES"' in /etc/rc.conf. > Nothing in a system reacted on the end of Summer Time period, > so ntpd just complained about 3600 seconds exceeded sanity limit > and bailed out (documented behavour). With standard /etc/crontab, adjkerntz -a (which catches DST changes) is only run between midnight and 5am, and presumably your 'today' started after then. Perhaps running that once on boot, just in case, might help in such circumstances? I've done that without ntpd running, but ntpd -qg once on booting should handle such surprise 3600s shifts better? > There is Status Register B at the offset 0x0b in the ISA Compatible > CMOS its least significant bit should keep Daylight Saving flag > (on/off). The bit appears to be DST enable, rather than storage of current state? Windows date setting has a check box that I suspect reflects this bit. You may find that windows will shift CMOS another hour when next booted too, or at least that's what I recall W98 doing to me a couple of times when I happened to boot it some time during some 6 month period :) > Is it used in modern hardware? Does FreeBSD use it? It is supposed to > use it? /sys/isa/rtc.h has #define RTCSB_DST 0x01 /* USA Daylight Savings Time enable */ but it's not referenced in /sys/i386/isa/clock.c (great bedtime reading) which is the only place that updates the RTC, AFAIK. If I'm reading it right, FreeBSD clears this bit during clock initialisation. (5.5-STABLE here; I haven't checked if this code has changed since) Cheers, Ian