CMOS, daylight saving time and dual-boot

Peter Jeremy peterjeremy at optushome.com.au
Sun Oct 28 08:55:28 PDT 2007


On Sun, Oct 28, 2007 at 03:39:55PM +0700, Eugene Grosbein wrote:
>It was tuned off yesterday evening and turned back on today,
>loading FreeBSD. Meantime the switch from Summer Time to Standard Time
>has ocurred.

And we've just switched to Summer time.

Based on a quick check, it doesn't look like adjkerntz(8) can handle
your situation.  In the absence of any independent time source, it's
actually very difficult to handle this situation.  In theory, it would
be possible to note that the last system shutdown (or last time the
RTC was set) and determine whether there's been a DST transition in
the period between then and now and adjust the RTC appropriately (I
believe Windows does this).  The problem is that, unless this record
is kept within the RTC and all OSs co-operate in its meaning, each
OS will independently adjust the RTC when it is next rebooted (and
I believe multi-boot PCs run into this problem).

Overall, the only sane approach is to keep the RTC in UTC and
compensate for DST in each OS.  Unfortunately, this isn't possible
due to historical decisions made by Microsoft.

> 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).

If you enable ntpdate, that should work around the problem because
ntpdate doesn't have the 1000 second sanity limit.

>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).
>Is it used in modern hardware? Does FreeBSD use it? It is supposed to use it?

FreeBSD doesn't use it - Status Register B is updated in a couple of
spots in /sys/i386/isa/clock.c to only have the 24hr bit set.  I'm not
sure what modern Windows expects but the DST rules embedded in the
MC146818 are now accurate for only a fairly small part of the world.

-- 
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20071028/dec4ce51/attachment.pgp


More information about the freebsd-stable mailing list