From: Ruediger Oertel <[EMAIL PROTECTED]>

> I don't really think it's userspace,
> cat /proc/rtc
> rtc_time        : 10:13:02
> rtc_date        : 2052-03-20
> rtc_epoch       : 1952
> and this _is_ already wrong without using any userspace-tools but "cat".

Looks like your RTC has year=0 and rtc_init() concluded
epoch = 1952, while it should have left epoch as 1900.
Probably it would be much better if the kernel didnt try
to guess at all and left it to userspace (hwclock --setepoch)
to set the epoch. But if you want the kernel to guess, then
replacing

        if (year > 10 && year < 44) {
                epoch = 1980;
                guess = "ARC console";
        } else if (year < 96) {
                epoch = 1952;
                guess = "Digital UNIX";
        }

by

        if (year >= 20 && year < 48) {
                epoch = 1980;
                guess = "ARC console";
        } else if (year >= 48 && year < 100) {
                epoch = 1952;
                guess = "Digital UNIX";
        }

will work for a few years.

Andries

PS This is in linux/drivers/char/rtc.c

Reply via email to