Subject: Re: Making rtc_offset changable at run time
To: None <tech-kern@NetBSD.ORG>
From: Valeriy E. Ushakov <>
List: tech-kern
Date: 04/18/2003 17:47:46
On Fri, Apr 18, 2003 at 15:36:44 +0200, Martin Husemann wrote:

> On Fri, Apr 18, 2003 at 03:49:01PM +0400, Valeriy E. Ushakov wrote:
> > What about importing FreeBSD's adjkerntz?
> I don't like it ;-)

Oh, not that I'm advocating it.  I thought that since you are studying
this part of the system you can make an informed evaluation of their
approach.  ;)

>  - adjust the offset again on shutdown
>    This could be easily acomplished with my solution too, but I decided not
>    to do it, since Windows insist on changing to/from DST itself if the last
>    boot was before the change

You have exactly the same problem with n-way-booting a mixture of
different versions of Windows and BeOS.  I'd say people know about
this problem and know hot to deal with it.  However consider:

. CMOS time is wall time in local TZ
. boot NetBSD
. rc.d script converts CMOS -> UTC for the kernel
. DST changes while NetBSD is running
. shutdown the machine
. shutdown doesn't update the CMOS clock	<--
. CMOS clock now 1 hour ahead/behind the changed wall time
. boot NetBSD
. rc.d script reads *wrong* wall time from CMOS

SY, Uwe
--                         |       Zu Grunde kommen            |       Ist zu Grunde gehen