On Monday, 20 Mar, Ruediger Oertel wrote:
> 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".
> 

It's a bug in the kernel epoch detection heuristics.  See the patch
attached.

In the meantime, the kernel's idea of the epoch can be corrected with
hwclock, e.g. (in your case): hwclock --epoch 2000 --set-epoch

Nikita
--- linux/drivers/char/rtc.c.orig       Mon Mar 20 12:13:57 2000
+++ linux/drivers/char/rtc.c    Mon Mar 20 12:23:10 2000
@@ -575,13 +575,14 @@
        if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
                BCD_TO_BIN(year);       /* This should never happen... */
        
-       if (year > 10 && year < 44) {
-               epoch = 1980;
-               guess = "ARC console";
-       } else if (year < 96) {
-               epoch = 1952;
-               guess = "Digital UNIX";
-       }
+       if (year >= 19)
+               if (year < 44) {
+                       epoch = 1980;
+                       guess = "ARC console";
+               } else if (year < 96) {
+                       epoch = 1952;
+                       guess = "Tru64 UNIX";
+               }
        if (guess)
                printk("rtc: %s epoch (%lu) detected\n", guess, epoch);
 #endif

Reply via email to