Re: updating the RTC automagically

Marc Lehmann (pcg@opengroup.org)
Tue, 23 Nov 1999 04:02:43 +0100


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

> > 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".

> > Last I looked, sysctl is not able to recalculcate timezone offsets
> > regularly and schedule a timer for the next update. AFAIK it can only set
> > and get values in the kernel, no complex formulas.
>
> Hmm.. signed offset of RTC from UTC, wouldn't that be enough?

If done at regular intervals, yes. And since you then need something in
userspace you do not need a syscall.

> The offset is a plain number every instant of time. Occasionally it
> changes, but this is not the kernels task to do that (the change).
> The kernel just does what is has been told to do (update the RTC or
> not, but do that correctly).

But this can already be done in userspace... why put it into the kernel???

This is my last post in this thread.

"modprobe /localvol/usr/share/zoneinfo/right/Asia/Shanghai"

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg@opengroup.org |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

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