Subject: Re: localtime & timezone adjustment?
To: John Valdes <valdes@uchicago.edu>
From: Bob Nestor <rnestor@augustmail.com>
List: port-macppc
Date: 01/21/2001 20:44:33
John Valdes wrote:

>Does NetBSD/macppc have any way to compensate for the fact the Mac
>(normally) stores local time in the hardware clock?  I set NetBSD to
>US/Central timezone (ln -s /usr/share/zoneinfo/US/Central
>/etc/localtime), but given that local time is stored in the clock,
>NetBSD is now 6 hours off.  I could store GMT in the local clock (the
>proper way time should be stored on a system, IMHO), but I multiboot
>my mac, and all the other OSes assume localtime and adjust for
>timezone accordingly.

Other ports have a similar problem.  Setting RTC_OFFSET would solve the 
problem, but it seems that it's not writeable via sysctl.  On the i386 
port I got around this by using the instructions in the INSTALL document 
for changing the address for some PCI devices.  Basically you boot up the 
system and get it to drop into the debugger. Then you modify the 
RTC_OFFSET value and write it back out.  Thereafter the NetBSD system 
applies the RTC_OFFSET to the hardware clock and all is well -- until 
Daylight Savings Time. ;)

-bob