Re: i386/RTC: old problem, new solution?

Riley Williams (rhw@MemAlpha.CX)
Wed, 19 May 1999 13:52:22 +0100 (GMT)


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.

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html

-
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/