Subject: Re: proposal for changes to todr interface
To: Garrett D'Amore <>
From: Perry E. Metzger <>
List: tech-kern
Date: 09/06/2006 21:16:08
Garrett D'Amore <> writes:
>> Isn't it better to always pass an adjusted time using rtc_offset
>> in kern_todr.c as old i386 todr functions did?
>> (since the default of rtc_offset is zero in param.c)
> That's a good question.  I was assuming that some ports want to use
> rtc_offset or not depending on whether or not the port used local time
> or not.  Some ports seem to honor rtc_offset, whereas some don't.

This is an "onion", to use the idiom that's been going on.

I added rtc_offset years ago when I removed the last vestiges of the
time zone handling from the kernel, in order to get rid of the ugly
hack we were using to make dual booting friendly on the PC. At the
time, all the todr infrastructure was MD, and I did the hack for the
i386 and assumed that whatever other ports needed the thing would
implement the right MD stuff too.

Now that we have central MI TODR handling, rtc_offset should just be
always done. There is no reason to have it optional or MD. If you
don't want the clock offset from GMT, just don't set rtc_offset.

So, just *always* honor it, as Izumi Tsutsui suggests.