Re: updating the RTC automagically

Albert D. Cahalan (acahalan@cs.uml.edu)
Tue, 23 Nov 1999 00:34:47 -0500 (EST)


Marc Lehmann writes:
> On Mon, Nov 22, 1999 at 04:02:26PM +0200, Ulrich Windl <ulrich.windl@rz.uni-regensburg.de> wrote:

>> Maybe some of the confusion arises, because the are actually two
>> timezones: Userland, to convert UTC to localtime, and kernelland to
>> convert UTC to RTC ;-) Both are "a bit related".
>
> Both need access to timezone rules ;)
>
>> But many systems set the RTC while running Win*ooze. That will affect
>> Linux time then.
>
> So what?? Do you tell me that linux should fix windows bugs? Or that linux
> should be able to magically able to detect that the time chenged while it
> was not running???

Have the loader ask?
Kernel command line option to adjust time before init runs?

I don't think anybody cares enough to solve this problem.
Network filesystems with local time are the most important
problem to solve, since they commonly span timezones.

>>> Doing it that way is absolutely wrong. Write a userspace
>>> deamon to change the timezone, so people that really need
>>> the bloat can install it.
>>
>> That was what I had in mind roughly.
>
> Good. How about a syscall that would say, in effect: "on the next
> minute change, update the tzoffset".

This is about right, but it would need a real-time process to change at
the right moment. I'm surprised we don't support operations like these:

a. At XXXXXXXX (a plain UNIX time) change the /foo/bar (an SMB
filesystem) time offset to YYYYYYYY (signed seconds from UTC).

b. At XXXXXXXX (a plain UNIX time) change the RTC to ZZZZZZZZ
(another plain UNIX time).

c. Cancel time change ID 42. (needed in case C: gets recycled)

...

Pending time changes could be listed in a /proc file.

BTW, forget the daemon. We already have cron. With the kernel
helping out, a monthly cron job can do the job.

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