Subject: port-macppc/9373: kernel should convert RTC value to UTC without RTC_OFFSET option
To: None <email@example.com>
From: Erik E. Fair <firstname.lastname@example.org>
Date: 02/08/2000 01:51:38
>Synopsis: kernel should convert RTC value to UTC without RTC_OFFSET option
>Responsible: port-macppc-maintainer (NetBSD/macppc Portmaster)
>Arrival-Date: Tue Feb 8 01:50:59 2000
>Originator: Erik E. Fair
International Organization of Internet Clock Watchers
System: NetBSD digital.clock.org 1.4.2_ALPHA NetBSD 1.4.2_ALPHA (DIGITAL) #10: Mon Jan 10 22:38:56 PST 2000 email@example.com:/usr/obj/sys/arch/alpha/compile/DIGITAL alpha
The MacOS keeps its hardware Real Time Clock (RTC) in local time.
NetBSD has an option(4) to deal with this: RTC_OFFSET
However, this is a compile-time option, and this is not
flexible enough (NetBSD users do not all live in the same
timezone - so we have to have 24 binary kernel distributions?
Also there are laptoys which change timezone as the user travels).
While it is possible to simply set the RTC to UTC/GMT, this
is inconvenient, if you alternately boot NetBSD and MacOS.
Fortunately, the Macintosh also keeps its location
(latitude/logitude, no less!) and offset from UTC in
"extended parameter RAM" (non-volatile). This means that
a suitably modified "clock" driver can read the clock, and
the P-RAM offset, and correctly set NetBSD's system time
at boot, without hosing up the the RTC value from MacOS's
point of view. The URL
documents that these values are available. A little more
searching in the Apple documentation should reveal the
format of "extended parameter RAM" and make this change
In addition, it may be desireable to add something to rc.local
for macppc to change the link for /etc/localtime to whatever is
read from Macintosh P-RAM.
This PR also applies to port-mac68k