PC RTC and BIOS issues

greenspun.com : LUSENET : TimeBomb 2000 (Y2000) : One Thread

There's been a lot of PC testing going on, and a lot of concern about PC y2k problems. Since I design PCs and write PC BIOS, maybe I can address some of these concerns at the low level.

1) There aren't any bad RTC chips I've ever heard of, or ever heard of anyone who's ever heard of. The large majority of RTCs (time/date chips) in PCs only support 2-digit years, but this doesn't represent noncompliance in and of itself. The BIOS should 'window' this date so that no problems will arise until at least 2099.

2) Older BIOSs have no windowing code for this date. Most of them will let the user (the 'user' in this case being a program making calls to the BIOS)set any date at all, from 0000 to 9999. The important point about BIOS code that does no windowing is that such a BIOS will not notice a century change. If the century changes while the PC is turned off, this BIOS will report a year of XX00 to the OS, the XX being whatever century the user put there. The OS may balk at this year and supply its own year (like 1980) as the default. Usually the change is from 1999 to 1900 internally. The OS may change this to 1980 internally (that is, reprogram the RTC to this value).

Similarly, if the PC was running during rollover, the date will change from XX99 (usually 1999) to XX00 (usually 1900). Programs making calls to these older BIOSs to get the date will get a date of 1900, and must be smart enough to window the century themselves. Programs that call the OS to get the date will get the correct date, since the OS maintains its own date.

Older BIOSs without windowing logic will 'fail' most PC y2k BIOS tests. This isn't really of much concern. The rule of thumb is, check your date after rollover. If it's wrong, change it. It will then remain correct until the battery dies. If you still have the PC at that time (these batteries last anywhere from 3-10 years normally. Newer PC designs run the RTC from the power supply rather than the battery whenever the unit is plugged in, even if it's turned off, but units this new are unlikely to have the older non-windowing BIOS).

3) Newer BIOSs have windowing code. Within certain (hopefully) unimportant limits, these BIOSs detect the century change and report the correct date. These BIOS pass the PC y2k tests, but of course will revert to 1980 if the battery dies.

There are still two places the BIOS needs to window the century change -- when power was off during rollover, and when it was on and the system was up and running. Some BIOSs only handle one or the other, and some PC y2k tests test for both, some for only one or the other.

The procedure is still the same, however: Check the date after rollover, and correct it if it's wrong. Then it will stay right.

4) I've heard of one BIOS (1994 Award) that won't change the century from 19 to 20 no matter what you do. This is a genuine bug, but not the end of the world. This should be treated like an XT, which had neither a RTC nor a battery. This is why the DOS default is to ask for time and date if no autoexec.bat file exists -- the default came from the days when you needed to set the time and date every time you rebooted, since the XT hardware had no RTC chip.

So if you set the year to 2000, reboot and it's back to 1980, this means you must remember to reset the date every time you reboot, just like in the old days. And somehow we survived the old days and were quite happy with them.

5) The RTC knows nothing about special leapyear rules. It assumes that every 4th year will be a leap year forever. In 2100, this won't work anymore. If you still have your PC in 2100, you are one *very* old packrat!

6) If you're on a network (at least, all networks I've been on), none of this matters since when you log in to the network, the network software reprograms your RTC to the network time and date anyway.

7) The reason BIOS issues are so trivial is because no date *calculations* are being performed. The date is simply stored and recalled. Real y2k issues arise only when dates are being incorrectly used in calculations, or in some other way such as in sorting, creating filenames or part numbers, etc. The BIOS does nothing like this. It's really simple-minded.

I know that PC applications do all kinds of things with dates, whatever the application creator came up with. This opens the door for a wide range of possible mischief. Replacing the RTC, or the BIOS, or the entire PC, won't derail this mischief even a little.

Concerns about RTC or BIOS are a false alarm. They aren't the problem, and they're nothing to worry about. PC applications are NOT a false alarm, and there are many true stories of horrible things happening during date-ahead tests. There is no such thing as a universal compliance testing program for a PC -- how could the author of such a utility know how you programmed your database? In my opinion, the BIOS testing utilities are ripoffs.



-- Flint (flintc@mindspring.com), March 15, 1999

Answers

Novell networks require a SYSTIME command in the system or user login script to set to the network time. <:)=

-- Sysman (y2kboard@yahoo.com), March 15, 1999.

I have recently seen a program that reads data files and looks for 'date like' strings that have only two digits for the year part of the string. Don't think it has much value, but will probably give it a try anyhow.

-- Paul Davis (davisp1953@yahoo.com), March 15, 1999.

flint, you will be shocked and surprised when microsoft comes out with their RTC fix this fall, since it is such a non-problem.

-- jocelyne slough (jonslough@tln.net), March 16, 1999.

jocelyne:

Not at all. If there weren't a sucker born every minute, Microsoft wouldn't exist.

-- Flint (flintc@mindspring.com), March 16, 1999.


Moderation questions? read the FAQ