Year2000.EXE v2.12c  1996-03-05 (Award v4.50x BIOS info change)

Tom Becker
Air System Technologies, Inc., Dallas
Email:  GTBecker@RighTime.Com
Homepage:  http://rampages.onramp.net/~gtbecker


     Year2000.EXE is a small resident program for DOS and
Windows that fixes the year 1999 to 2000 date change flaw of
the CMOS RTC in AT-class PCs and PS/2s, 286 through Pentium and
its clones.  It works, and it's free.


     Introduction:

A serious problem was designed into the PC in 1984 (and into
many applications since) and remains a problem today: most
computer systems will not gracefully enter the next century,
only a few years away.  The system date will probably be
incorrect - without assistance, anyway - on 2000-01-01 or later
because of a hardware flaw.  Similarly, many software
applications will misbehave as the year 2000 is approached and
passed, too, even if the system date is correct.

As this is written, a few machines are being produced that
cure the CMOS RTC century problem; it's probably safe
to expect that that will become the norm eventually.  At the
moment, though, virtually 100% of the PCs in use will fail to
advance the date to year 2000; this program will help those
machines that are still in service then.

We suggest that you install Year2000 now to be certain that your
machine is corrected.


     A Hardware Problem:

The standard PC computer system maintains two system dates; one
is in the CMOS Real Time Clock chip - a hardware component that
is normally on the machine's motherboard - and one is in the
DOS (and Windows) operating system software.

These two dates are represented differently.  The CMOS RTC date
is kept as century/two-digit-year/month/day and the DOS date is
kept as days-since-1980/01/01 which is converted to
four-digit-year/month/day when any program asks for it.  When
DOS boots, it normally initializes its current date by reading
the date in the CMOS RTC and converting it to
days-since-1980/01/01.  DOS maintains its date as long as the
system is running; the CMOS RTC hardware maintains its date
whether the system is running or not, but it does not maintain
the century.  In the CMOS RTC, year 99 overflows to 00 and the
century remains unchanged so the effective year becomes 1900;
in DOS, year 1999 overflows to 2000.  So until the system is
rebooted, there will appear to be no problem with the
transition from year 1999 to 2000; but trouble lurks in the
CMOS RTC date, which has become year 1900.

If, when DOS boots, it reads an out-of-range date from the CMOS
RTC, as 1900 is, the date conversion algorithm (to
days-since-1980/01/01) calculates an erroneous 1980-01-04;
that's what the DOS date will become after rebooting the system
after the year 2000 transition if the CMOS RTC exhibits the
standard flaw.

A few specific BIOSs cause behavior other than the standard 
flaw.  Importantly, the Award v4.50 series BIOS (dated prior to 
November 1995) - currently common among Pentium- and 486-based 
machines - will not allow any date after 1999 and can not be 
corrected by software.  See below.


     A Test:

You can easily determine if your system suffers the year 2000
CMOS RTC flaw.  From a DOS prompt (ideally with no CONFIG.SYS
or AUTOEXEC.BAT) perform the following steps:

Power off test:
     C:>DATE 12-31-1999
     C:>TIME 23:59
- Power off for more than one minute,
- Power on.  Allow the system to boot.
- Check the DOS date.  It should be 01-01-2000.  If it's not
     (it's usually 01-04-1980), the machine exhibits the
     year 2000 flaw.

Power on test:
     C:>DATE 12-31-1999
     C:>TIME 23:59
- Wait for more than one minute; you can watch an on-screen
     clock if you like (but not the BIOS Setup clock screen).
- Check that the DOS year has changed to 2000.
- Reboot.  The DOS year should still be 2000.

While you're at it, check to see if your year 2000 is a leap
year (see references below):
     C:>DATE 02-29-2000
- If you get an error, the BIOS is incorrect.  Year 2000 will
     be a leap year, so this set should be valid.

Don't try to do these tests from the BIOS Setup screen.  The
BIOS will likely wrap the date from 12-31-1999 to 01-01-1980
(or 1994), not to the normal 01-01-1900, invalidating the test.

If you try these tests with Year2000.EXE installed, you should
see correct results.  [If you do not see correct results,
please report it so we can investigate your machine type.]


     A Solution:

Assuming the user remembers to do so, this erroneous DOS date
can be corrected by simply setting the date to what it should
be; DOS will (via the BIOS) set the CMOS RTC century correctly
so subsequent boots will yield the correct date.  The date will
be incorrect, though, until the correct date is set (a network
login will usually set the date).  Or, if Year2000.EXE is
installed, the century correction will happen automatically.

Year2000.EXE applies a simple rule: if the CMOS RTC two-digit
year (in CMOS address 9) is less than 50 the century (in CMOS
address 50d, or 55d for PS/2 machines) is assumed to be 20,
otherwise the century is assumed to be 19.  This makes the
resulting year range 1950 through 2049 rather than 1980 through
2099, the usually expressed limits, but in 2049 these machines
will be relics at best, so it's doubtful that this will be a
practical detriment.  The century change rule must be applied
at two times: at boot, to cover the likelihood that the year
change has occurred while powered off, and, when powered on, at
each time the CMOS RTC two-digit year changes (which only
occurs once each year at New Year's Eve midnight).
Year2000.EXE uses standard periodic interrupts to test for this
occasion.  If, when Year2000.EXE loads, the year is already
2000 or greater, it will not remain resident since the program
then serves no purpose.  When it is resident, though, it
occupies less than 500 bytes, uses trivial processor time, and
should exhibit no compatibility problems.


     Installation:

Simply execute Year2000.EXE early in AUTOEXEC.BAT as follows:
     drive:\path\YEAR2000.EXE

For example, if you choose to put Year2000.EXE in a directory
you've named Y2K on your C: disk drive, you must place this
statement in your AUTOEXEC.BAT file:
     C:\Y2K\Year2000.EXE

The program will work properly under DOS through Windows 95.


     A Suggestion:

Year2000.EXE is an extract of RighTime - the learning high
precision system clock manager.  RighTime solves all of the
system clock problems that are inherent in the AT-class PC and
produces a clock that is reliable, highly accurate and secure.
Reliably correct system time is important; RighTime should be
running on your machines to be certain that yours is correct.


RighTime is available from

Air System Technologies, Inc.
14232 Marsh Lane, Suite 339
Dallas, Texas  75234-3865  USA

Email:     Info@RighTime.Com
           http://rampages.onramp.net/~gtbecker

Fax:       (500)448-9661 or (214)304-3921
BBS:       (500)673-4625 or (214)304-3217
Voice:     (500)448-9660 or (214)304-3242

[Area code 214 will change to 972 sometime soon.  The 500 area
code numbers will never change, so use them if you can.]


     A Caution:

Year2000.EXE and this file (Year2000.TXT) are Copyright
1995-1996, GTBecker, Dallas.  All rights are reserved.

Permission is granted to freely copy, distribute and use this
program in its complete, unmodified form including this text
file.  No warranty of performance or suitability is expressed
or implied.  Every effort has been made to make this software
program deliver as this documentation describes, but the
correctness for your application or environment cannot be
assured.  Air System Technologies cannot assume responsibility
for the failure of this software program, nor for any
consequence of its use.  You are encouraged to test the
applicability of this program to your requirements.

If you need more confidence than that, contact us; we can help.


     References:

Is the year 2000 a leap year?
          "The year 2000 will be a leap year.  Century years
     (like 1900 and 2000) are only considered leap years if
     they are evenly divisible by 400.  Therefore, 1700,
     1800 and 1900 were not leap years, but the year 2000
     will be a leap year."
          "To understand this, you need to know why leap
     years are necessary in the first place.  Leap years are
     necessary because the actual length of a year is [about]
     365.242 days, not 365 days, as commonly stated.
     Therefore, on years that are evenly divisible by four
     (like 1992, for example) an extra day is added to the
     calendar on Feb. 29.  However, since the year is
     slightly less than 365.25 days long, adding an extra
     day every four years results in about three extra days
     being added over a period of 400 years.  For this
     reason, only one out of every four century years is
     considered as a leap year."

     from NIST:
     gopher://zserve.nist.gov:79/0/.docs/.releases/TIMEQ%26A.FCT


Award v4.50x BIOS information:

     If you have a machine that uses the Award v4.50 series BIOS
     (most commonly v4.50G) that is dated prior to November 1995,
     you'll find that the BIOS (and therefore the CMOS RTC) will
     not accept any dates after 1999 nor prior to 1994.  Award
     tells us that you should be able to get a BIOS upgrade from
     the OEM (the machine or motherboard's supplier or
     manufacturer).  If you are unable to determine the OEM or
     can't contact them, get the BIOS part number from the top of
     the CMOS Setup screen and contact Award directly.

          Award Software International Inc.
          777 East Middlefield Road
          Mountain View, CA 94043-4023 USA
          415-968-4433 (voice)
          415-968-0274 (fax)
          support@award.com
          http://www.award.com


