On Sat, Jan 08, 2000 at 12:46:11PM +0800, Aller Persson wrote:
> Invalid values in hardware clock: 0/01/08 11:53:27
> This is saying me that it must be something with Amiga-DOS "setclock" that
> only put in one digit in the year. Because hwclock will run OK if I set the
> ate and time with hwclock and not with Amiga WB-Prefs or AmigaShell Date.
> I also changed to year 2010 with Amiga WB-Prefs and the problem was gone.
> Now is my question: Is this really a problem with hwclock?
> I do not think so, but I am not any specialist of any sort so I can not say.
> Is it not mktime() that will be confused to only see one digit in the year?
> I leave this to you who knows better than me.
I looked a little into this, I think this is a Y2K bug of AmigaOS. If you
change hwclock.c to display 4 digits (instead of 2) to display the year, you
will note, that in above case year (which represents year - 1900 according to
time.h) is 0. When the clock is set correctly, you will get 100 (-> year ==
2000), which is correct. This explains why in the correct case you see "00"
for the year and in the incorrect you see " 0".
Now on second thought, this is a bug in hwclock, it should show year 100 now
and not 00.
So I think what could be done with not too much trouble, is add a workaround
to hwclock to add 100 to the year, in case it is <10 (you said after 2010
everything is ok again? Did you check for correct weekdays? Maybe hwclock is
working then, but thinks we are in 1910...).
Is this sufficient? I dont think so, what about other programs using time.h?
Do we need a workaround in glibc? I dont think, we would be allowed to do
that. But then, maybe a hwclock, which corrects the time (add 100) is
sufficient, since its called during boot and later on the time is correct.
But these are all only workarounds, the bug is in AmigaOS.
Fix: remove AmigaOS... or beg for a fixed settime...
I heard a fixed "version" command for AOS is out? The last time I programmed
under AOS, I was a bit annoyed by VERSION strings, the year 2000 has to be
set as 100 in the string, seems the problem is deeply buried in AOS, but I
do not know how much was fixed with V3.5... it came out only in november(?),
so maybe they have some Y2K fixes included?
Opinions? Adding 100 if year <10 is a temporary fix (for only the next 10
years), should we go for that for the moment? But detecting this obviously
wrong year was ment as a sanity check for a completely incorret set clock...
Now, what will we do in 2090...
PS Ive received enough flowers now, they dont buy me more time unfortunately.
RSL understood a few things now, he excused himself, so everybody is happy
now, lets go back to work, will we?
I do not want to stop all questions being asked on this list (doesnt happen
anyway), this list is ment for questions related to m68k specific problems
with the debian distribution. You are welcome to tell about problems here,
also to help solving problems (see Y2K, I think we made a big progress here
due to this list). If you think you have an answer to a FAQ, pleae write it
down and we will think of a way to make it available for everybody (Chris L
maintains the linux-m68k FAQ, an excellent piece of information, you are
allways welcome to write sections for it).
The good thing is, you do not have to be a debian maintainer to do this
(allthough you´re welcome to apply), and you will not be made responsible for
it, you will only get the credits :-)
If you have problems with packages (non-m68k specific), try using the
debian-users list, if you have kernel specific problems, linux-m68k is for
"Turn the clock to zero boss"
"The river´s wide we´ll swim across"
"We´re starting up a brand new day"
"Turn the clock to zero buddy"
"Don´t wanna be no fuddy duddy"
"We´re starting up a brand new day" -- Sting
- Re: Y2K
- From: Aller Persson <email@example.com>