[PATCH] rtc.c

From: Andries.Brouwer@cwi.nl
Date: Mon Mar 20 2000 - 08:54:59 EST


People report that an Alpha with year==0 in RTC
gets assigned epoch 1952, so that the year ends up as 2052.
The patch below should fix this for the coming twenty years.

Andries

[copied from another window - tabs will have become spaces]

--- rtc.c~ Sat Mar 18 23:25:12 2000
+++ rtc.c Mon Mar 20 14:48:48 2000
@@ -670,10 +670,10 @@
        if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
                BCD_TO_BIN(year); /* This should never happen... */
 
- if (year > 10 && year < 44) {
+ if (year >= 20 && year < 48) {
                epoch = 1980;
                guess = "ARC console";
- } else if (year < 96) {
+ } else if (year >= 48 && year < 100) {
                epoch = 1952;
                guess = "Digital UNIX";
        }

-
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/



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