Re: RTC-Clock misfunction on AS 400

From: Ruediger Oertel (ro@suse.de)
Date: Sun Mar 19 2000 - 18:59:10 EST


On Sun, 19 Mar 2000 SDenningho@aol.com wrote:

> Hi,
>
> I've a problem with the real-time clock. It detects digital unix epoch 1952,
> but sets
> my clock to year 2052 (even if SRM says 2000)!
> Any idea ?
yes, it seems to be something like a y2k-bug ...

it's got to be close to these

from linux-2.2.14/arch/alpha/kernel/time.c:309
[...]
        if ((year += 1900) < 1970)
                year += 100;
        xtime.tv_sec = mktime(year, mon, day, hour, min, sec);
        xtime.tv_usec = 0;
[...]

from linux-2.2.14/drivers/char/rtc.c:
[...]
static unsigned long epoch = 1900; /* year corresponding to 0x00 */
[...]
        if (year > 10 && year < 44) {
                epoch = 1980;
                guess = "ARC console";
        } else if (year < 96) {
                epoch = 1952;
                guess = "Digital UNIX";
        }
[...]

-- 
with kind regards (mit freundlichem Grinsen),
                              Ruediger Oertel (ro@suse.de)
----------------------------------------------------------
          does "DONT PANIC" give a hint ?



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:42 EST