Messages in this thread | | | Date | Mon, 22 Nov 1999 15:05:24 +0100 | From | Marc Lehmann <> | Subject | Re: updating the RTC automagically |
| |
On Mon, Nov 22, 1999 at 08:11:30AM +0200, Ulrich Windl <ulrich.windl@rz.uni-regensburg.de> wrote: > > For most machines it is sufficient to update the timezone information > twice a year.
Yes, that's what the userspace deamon is for, namely finding out _when_ to switch the timezone.
Or you do it in the kernel, which requires an elaborate setup (including the tzcode for example :()
You might fold this into cron (maybe using a scheduled at job), but you still need no kernel support for this.
> > (Please note that the trickery the kernel does to "detect" the timezone > > is far from being correct. It's only a hack for those poor people using > > windows). > > Yes, but probably the majority of Linux users has such a dual > configuration.
Yes, but most people I know just set their clock to utc. The time windows gets is usallly not important.
Putting more than a hundred gzipped source into the kernel just to get the current timezone is out of the question (lest, you have to update that code regularly).
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.
> > Now the question would be "how to inform the kernel about the timezone"? > > (And keep the info updated). > > sysctl, what else.
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.
Oh sorry, I asked "timezone" not "timezone offset". However, as many people have pointed out, this would require the whole tzcode + tzdata in the kernel.
However, how about writing some mini vm in the kernel (a forth compiler could fit in under 4k or so) and then create a program from the tz data which could be uploaded into the kernel.
(Nah, still too large).
-- -----==- | ----==-- _ | ---==---(_)__ __ ____ __ 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/
| |