Messages in this thread | | | Date | Thu, 20 May 1999 23:41:17 +1000 | From | Richard Gooch <> | Subject | Re: i386/RTC: old problem, new solution? |
| |
Riley Williams writes: > Hi Ulrich. > > > maybe the problem running RTC in non-UTC time is known to you, > > including its implications. Basically the kernel lacks two > > things when booting: > > > 1) time zone > > 2) Whether RTC runs UTC or local time > > Certainly on my setup, the kernel never even attempts to read the RTC > itself and that's left to a userspace program (hwclock) that gets run > from the boot scripts with the relevant parameters. The said program > also makes use of a SymLink that tells it what the local timezone is, > so has all the information needed to RE-initialise the system clock to > match what the hardware clock claims is the case. > > > My solution would be: > > > 1) Add a kernel parameter like RTC=UTC|local > > 2) Add a kernel parameter like TZ=+0200 (numeric notation used > > in EMail) > > Both are already part of the hwclock program. > > > 3) Enhance routines that set the system time to update the RTC > > as well > > Your wording is ambiguous, so I'll deal with both possible meanings: > > a. There are various programs available to synchronise the system > clock with some external time standard. I use rdate as part of > my dial up script, and a friend of mine uses a program that > synchronises his system clock with that broadcast on teletext. > > b. The hwclock program also has the ability to set the RTC from > the system clock. > > The combination of those two means that it is already possible to both > synchronise the RTC with an external time standard and to ensure that > the kernel is itself so synchronised. > > > I some people can convince me that it's a good idea, I might > > develop a patch... > > Unfortunately, it's already been dealt with in userspace, so any > kernel patch you developed would be unlikely to be applied anyway.
In fact, there already is a patch in the kernel: CONFIG_APM_RTC_IS_GMT, but it's a temporary hack, until a better scheme is implemented. The reason is that the kernel needs to know the timezone the RTC is stored in when restoring the system clock after a suspend/resume cycle. Automatically computing the difference has its problems.
Regards,
Richard....
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |