From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,62e31b33685d1cb9 X-Google-Attributes: gid111c93,public From: "His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated" Subject: Re: Redhat 5.2, Multia, Datestamps all messed up. Date: 1999/01/06 Message-ID: #1/1 X-Deja-AN: 429387194 Sender: xenophon@nemesis.irtnog.org X-PGP-Key-URL: X-Disclaimer: My attitude is this. I'm full of it. If you listen to me, that's your problem. References: <36911F63.F8EB6932@wra.org> <3692C161.CF2E9410@lamar.colostate.edu> X-Day: Sun, 05 Jul 1998 07:00:00 X-yow: Yow! Are we wet yet? Comments: Hyperble mail buttons accepted, v04.01. X-Home-URL: X-Face: meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow Organization: First Church of B1FF and BRAK! (Reformed) X-Linux: Proud user of Linux since August 1994! Warnings-to: xenophon@irtnog.org X-Attribution: XF X-PGP-Key-ID: Length=1024; ID=0x1051A069; Fprint="2A C5 42 06 04 3B F6 CC 8F AF AC 22 9A B1 2F 7B" Newsgroups: comp.os.linux.alpha >>>>> "BW" == Bill Wangard writes: BW> I am having a simlar problem. Occasionally, the machine date BW> stamp advances 20 years to 2018. I don't know why, but I'd BW> love to fix the problem. The simple answer is: Make sure you've got the proper settings in /etc/sysconfig/clock. If the package installation and file system dates bother you, you can reinstall each package with "--replacepkgs". A complete list of installed RPMs can be retrieved with "-qa". I'll leave it as an exercise to figure out how to script it (shouldn't be more than a couple of lines in Perl). Here's the long answer (after I ran into this problem about a year ago): Date Problems ============= In my RPM database, I have the following entry (I did the actual install on March 8, 1998): Name : mkdosfs-ygg Version : 0.3b Release : 5 Install date: Thu Mar 8 07:51:41 2018 The reason this occurs is that the system clock is set to ARC console time, which has for its starting epoch 1980. 1998 is therefore 18 years after the epoch. SRM uses an epoch of 1900; 18 years after epoch is 1918. If I read linux/drivers/char/rtc.c correctly, `get_rtc_time()' adjusts the real-time clock output if the year is less than 69 by adding 100 to the year, so 1918 becomes 2018 if it reads the RTC clock *thinking it's set to the SRM epoch*. Again, if I'm reading the RTC code correctly (and I might not be, so be forewarned), *you should be able to set your clock to 98 years from the ARC epoch, that is 2078, and the kernel (and the Red Hat installer) will then correctly compute 1998 when it assumes the SRM epoch*. NOTE that you will *ONLY want to do this with 2.0.x kernels.* Recent 2.1.x kernels seem to try to autodetect the starting epoch and adjust the year accordingly. In 2.0.33, the RTC code does this: /* * Account for differences between how the RTC uses the values * and how they are defined in a struct rtc_time; */ if (rtc_tm->tm_year <= 69) rtc_tm->tm_year += 100; And in 2.1.98 it does this: /* * Account for differences between how the RTC uses the values * and how they are defined in a struct rtc_time; */ if ((rtc_tm->tm_year += (epoch - 1900)) <= 69) rtc_tm->tm_year += 100; (Now taking the starting epoch into account). Note that this only seems to occur when booting Linux from ARC (via MILO). I'm assuming that if you use SRM, and set your system clock from SRM, you shouldn't have the dreaded 2018 problem. It's a rather silly kernel bug; I really don't understand why it didn't get squashed until 2.1.x. -- Rev. Dr. Xenophon Fenderson, the Carbon(d)ated, KSC, DEATH, SubGenius, mhm21x16 Pope, Patron Saint of All Things Plastic fnord, and Salted Litter of r.g.s.b "Abraham came not to sacrifice, but to know once and for all whether this God was a god to be trusted and obeyed. No other test would do." (Fall of Hyperion)