Skip to contentSkip to conversation

rtc again...

DISCUSSION Iain Sandoe 2 participants 2 messages Aug 8, 2000

lore
Share & tools
lore
#0 lore raw
Quoted 21 lines · Gabriel Paubert
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines

Actually given the problems with RTC being UTC or local time, the offset might perhaps better be setup as a kernel parameter so that th system start up in a known good state. It seems that it is in RAM for Macs, but what about other machines (I have no problems since all my machines are UTC and I simply refuse to use an OS which requires anything else) ?

Quoted 6 lines

Why do you want to handle the offset in the kernel???

Any decent distro (e.g. Debian) allows to configure the time system for a hardware clock running in either UTC or local time, so the correction will be done on boot up.

I think there is some misunderstanding here. I don't want to handle the offset in the kernel, with one possible exception: when reading the RTC for the first time to initialize xtime. Getting timestamps right as early as possible might be important in some cases, and it's not a big deal since the code to do this is small and thrown away anyway.

Quoted 5 lines

Oh and I can't remember whether the clock or hwclock command ever worked on my machines. I think hwclock did once upon a time; life is so much simpler with NTP anyway (but it is run quite late in the boot process, actually just before the rc.local script on most of my machines and after mounting NFS file systems and starting daemons like syslogd/crond/inetd).

I seems to me (in summary) [since I started this thread :-) ]:

we can:

(a) Fix up time in the kernel to emulate UTC
(b) Fix up time in the kernel to emulates Local Time

Which (or will both) of these works with hwclock (since that is the mechanism at 2.4.0 ?) and for those of us switching to-and-ffo is also being used at 2.2.17

I would like to make sure that timestamps are right during kernel boot - and, at the moment, when using 2.2.17 I have to 'artificially' disable rtc to get the correct time.

For many (paid-by-the-call) telephone network users NTP is not a suitable option - they don't like the machine making calls without asking.

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 6 lines · Iain Sandoe

I seems to me (in summary) [since I started this thread :-) ]:

we can:

(a) Fix up time in the kernel to emulate UTC
(b) Fix up time in the kernel to emulates Local Time

Please also think about people who really run their RTC in UTC, who don't run MacOS anymore, or who simply don't have a PowerMac.

Quoted 3 lines

Which (or will both) of these works with hwclock (since that is the mechanism at 2.4.0 ?) and for those of us switching to-and-ffo is also being used at 2.2.17

Hwclock is userspace. It depends on the distro.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/