Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/etc



"Perry E. Metzger" <perry%piermont.com@localhost> writes:
> Martin Husemann <martin%netbsd.org@localhost> writes:
>> Log Message:
>> Add a new /etc/rc.conf option: rtclocaltime=YES adapts the RTC offset
>> at boot automatically, so a machine dual booting another OS that uses
>> the RTC at localtime and NetBSD agree on the current time even if daylight
>> saving started/ended (without recompiling a kernel twice per year).
>> Awk code by Matt Thomas.
>
> How does this work? inittodr is called far too early during boot for
> later settings of the offset to do the right thing...

Ugh. It is even worse than I thought. Whereas before there was no
behavior associated with setting rtc_offset, now there is a
sysctl_kern_rtc_offset that does the wrong thing... :(

Does this stuff actually work properly in the face of things like DST
transitions? My assumption is "no, it fails in unpleasant ways"...
The code makes the implicit assumption that the kernel's idea of the
time has to shift when rtc_offset changes, when in fact sometimes you
want kernel time to change and sometimes you want to do a resettodr,
depending on *why* you are changing rtc_offset.

In any case, I think all this needs to be rethought.

-- 
Perry E. Metzger                perry%piermont.com@localhost



Home | Main Index | Thread Index | Old Index