Subject: Re: double summertime :-(
To: David Laight <david@l8s.co.uk>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: port-i386
Date: 04/24/2002 16:23:00
On Wed, Apr 24, 2002 at 05:07:29PM +0100, David Laight wrote:
> I've an x86 PC that usually runs netBSD, but sometimes has to
> run win98 (usually because of a web site that only IE will
> render).
> 
> Booting win98 it came up with its 'the system has detected
> the start of daylight saving, has has changed the system clock'.
> (Dunno why it can't run on UTC like everything else :-(  )

That is the problem.

> Anyway, next time I boot netBSD I find the clock has advanced
> an extra hour :-(

Because before it was reading the hardware clock as UTC, and printing UTC+1.
Now that Windoze has fiddled, NetBSD reads UTC+1, thinks it is still UTC,
and prints (UTC+1)+1.
> 
> It looks to me as though the code in sys/isa/clock.c should be
> looking at the contents of MC_REGB (in this case the MC_REGB_DSE
> flag) when setting the time.
> 
> Futhermore I'm not sure that rtcinit() should blindly be
> setting MC_REGB to MV_REGB_24HR.  I think this will cause
> Win98 to advance the clock yet again.
> (I need to do that soon.....)
> 
> Anyone know any idea why this code is still broken
> after so many years?

The fix is:

options     RTC_OFFSET=0    # hardware clock is this many mins. west of GMT

in the kernel config..

Cheers,

Patrick