Subject: Re: Q for i386 FAQ
To: William O Ferry <WOFerry+@CMU.EDU>
From: Perry E. Metzger <perry@piermont.com>
List: port-i386
Date: 10/27/1998 15:08:10
William O Ferry writes:
>     Two related questions:  First off, I presume there's some reason why
> NetBSD/i386 couldn't just keep the clock in the local time, and
> back-calculate GMT from it?

That is what the rtc_offset option is for in the first place.

If you are asking us to try to store the entire database from
/usr/share/zoneinfo in the kernel, though, I think you haven't done a
du on that directory recently.

> Second, on the reference to using sysctl to set the
> value (which, BTW, the rtc_offset isn't listed in the sysctl(8) or
> sysctl(3) manpages),

The sysctl would be useless to use for this. rtc_offset is used during 
inittodr(9), which happens well before any of /etc/rc gets touched
(indeed, before init(8) gets revved up).

> do sysctl changes actually survive reboots?

No.

> If sysctl's changes are permanent, I have the start of a C program
> to set the sysctl variable based on the GMT offset of the current
> timezone.

It would be better to produce a hack to patch kernel variables in
general and to produce a shell script that used that to accomplish
setting the timezone offset. We could then put this into the source
tree if it was clean.

Perry