* Re: Redhat 5.2, Multia, Datestamps all messed up.
1999-01-05 5:00 ` Bill Wangard
@ 1999-01-06 5:00 ` His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated
0 siblings, 0 replies; 4+ messages in thread
From: His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated @ 1999-01-06 5:00 UTC (permalink / raw)
>>>>> "BW" == Bill Wangard <wangard@lamar.colostate.edu> 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)
^ permalink raw reply [flat|nested] 4+ messages in thread