Messages in this thread | | | Date | Fri, 21 May 1999 00:26:53 -0400 (EDT) | From | Rafael Reilova <> | Subject | Re: i386/RTC: old problem, new solution? |
| |
On Fri, 21 May 1999, Richard Gooch wrote:
> Ulrich Windl writes: > > On 20 May 99, at 23:41, Richard Gooch wrote: > > > > > Riley Williams writes: > > > > [...] > > > > > > Unfortunately, it's already been dealt with in userspace, so any > > > > kernel patch you developed would be unlikely to be applied anyway. > > > > > > In fact, there already is a patch in the kernel: > > > CONFIG_APM_RTC_IS_GMT, but it's a temporary hack, until a better > > > scheme is implemented. The reason is that the kernel needs to know the > > > timezone the RTC is stored in when restoring the system clock after a > > > suspend/resume cycle. Automatically computing the difference has its > > > problems. > > > > Maybe you'll agree that akernel parameter is probably better than a > > compilation parameter. For distributions it will make things much > > easier. > > [...] > > The only place I'm aware that the kernel needs to know the timezone is > this case with suspend/resume. So aside from this, I don't see a need > for the kernel to know the timezone. Hm. Although I vaguely remember
The other case which has been claimed is to set the mount/fsck timestamps on the filesystems at boot, but it is mostly a special case, ie,
1. kernel boots (RTC is non-UTC) and has no idea of the timezone 2. root filesystem is monted read-only (2.5). run fsck on / (this is the catch, see below) 3. hwclock is run from the boot scripts, kernel now knows correct time 4. remount / rw 5. mount/fsck/etc proceed as usual with the right time.
Now if the root filesystem is corrupted, then after fsck is run, time will probably be messed up in it, but that is an abnormal condition. The other posibility is to run hwclock before fsck, but that is not safe. If you have everything in a single partition then that's another story ;-)
IMHO, a simple command parameter giving the offset in hours (half-hours?) from UTC to the kernel is fine, but I really hope nobody is considering adding daylight savings, leap seconds, and all that userland craziness to the kernel 8)
Cheers,
-Rafael
- 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/
| |