It can't keep time because you have a bad CMOS battery
A computer needs a certain amount of information to operate; for example, the date and time, the amount of memory installed, the number of drives and their configuration, and so on. In the early days of computers, either the user typed in this information each time the computer started, or it was set using DIP switches and jumpers. Today, computers store this information in a CMOS chip that uses a small battery to retain the information when the computer is shut off.
CMOS (complementary metal oxide semiconductor) is type of chip that consumes very little power; therefore, while the computer is turned off, the battery discharges very slowly. But the battery will totally discharge if you leave your computer turned off for a year or so. Even if you turn your computer on every day, the battery is designed to last only a couple of years. Occasionally a battery will fail prematurely.
Today's plug-and-play computers can detect most of the necessary settings, but if your CMOS battery is dead, your computer will not be able to retain the date and time. The computer will also lose any custom settings, for example, the boot sequence. If you set a password in CMOS, you may be locked out of the computer. If the CMOS battery does fail, you might receive the message "System Configuration Lost" when you start the computer. It would be wise to record all the CMOS settings as a precaution.
To record the CMOS settings, watch for an on-screen prompt when you first start your computer. The prompt tells you to press a key, usually the Del or F2, to enter CMOS. To enter the CMOS configuration utility, you have to press the indicated key while the message is on the screen. After the CMOS configuration screen appears, follow the instructions provided to page through all the screens and record all the settings.
If your computer loses its time setting overnight, the CMOS battery may not be holding a charge. The CMOS battery is located inside the case on the motherboard. Changing the battery is usually a job for a computer technician. In fact, a layman might not even be able to find the battery.
If you want to locate the CMOS battery in your computer, be aware that a static discharge from your hands can damage components inside the case. After taking proper precautions, open the case and look on the motherboard for a battery. If you have a diagram of your motherboard, locate the battery on the diagram first.
Different motherboards use different types of batteries. The battery may be shaped like a barrel or a coin. Some motherboards use a component that resembles a chip which contains the CMOS and the battery (made by DALLAS or Benchmarq). Batteries come in different voltages, so make sure you get an exact replacement.
Sometimes the battery is mounted in a holder. Sometimes it is soldered to the motherboard. De-soldering and re-soldering a battery is usually a job for a computer technician. An inexperienced solderer can cause a lot of damage. If you want to try to do it yourself, first practice on an obsolete circuit board. You may change your mind.
If the CMOS battery has failed because it's too old, this might be an opportunity to upgrade your motherboard. When upgrading a motherboard, the most important considerations are to make sure the new motherboard is the correct form factor for your case, and that the new motherboard has the correct bus connector slots for your expansion boards.