Subject: Re: preposterous clock chip time
To: Philippe Saint-Jacques <h0ho@hotmail.com>
From: Marcus Comstedt <marcus@mc.pp.se>
List: port-dreamcast
Date: 04/22/2003 12:29:41
"Philippe Saint-Jacques" <h0ho@hotmail.com> writes:
> Hi. I am not sure if this is Dreamcast specific but since it happens on a Dreamcast, here I come.
>
> I use HEMI's binary distribution. NetBSD 1.6L.
> http://www.puresimplicity.net/~hemi/dreamcast/
>
> I experience trouble to set the right time on my system. I tried to set the right time by using the setup menu (the animated icons), but when I boot NetBSD after, the kernel complains
>
> WARNING: preposterous clock chip time
> -- CHECK AND RESET THE DATE!
>
> and the system thinks the time is one hour ahead of the real time. [I set 00:42 in the setup menu and NetBSD thinks it is 01:42]. I can set time back to 00:42 with "date 0042", and now the time is OK. but after the next reboot, I get back one more hour.
>
> Then I looked for something in /etc/localtime. I first deleted that link. Then "date" gives me 5 hours ahead, instead of 1. Then I replaced that link with /usr/share/zoneinfo/Greenwich. I beleived that using a GMT 0 zone would use exactly the time in the system clock. But it did not work. giving me 6 our more. When there is no /etc/localtime, system uses GMT time. But that doesn't tell me more from where comes the time. Then I tried my timezone, Canada/Eastern, or GMT-5. And I get One hour ahead of the date specified in the clock chip.
>
> I have no idea what is happening here. Would just upgrading the kernel to 1.6R fix this ? or is it just some settings that I don't understand ?
Since the builtin realtime clock uses local time, and not GMT, the
kernel will try to compensate when reading the clock chip, in order to
get the GMT time. The compensation factor is compiled into the
kernel, check the RTC_OFFSET option in your kernel config.
(In the GENERIC config, the option is commented out, giving an offset
of 0.)
// Marcus