A computer's clock can lose or keep incorrect time because of a failing CMOS battery, failure to synchronize the system clock with a time server, setting the wrong time zone or the presence of a malware. Insufficient operating memory can also cause the problem.
Failure by the computer clock to keep time is not always because of problems with the CMOS battery. If the problem persists after troubleshooting the CMOS, it is imperative to fix the time zone or synchronize the system clock with the correct time server. In case the clock still does not keep time, the culprit may be a malware attack.
Troubleshooting is the only way to know why a computer clock loses or doesn't keep time. If the problem is a weak CMOS battery, replace it. Rebooting the machine once per day frees up memory and may solve the problem. Another quick solution is to get a Network Time Sync program which connects to a server at specified intervals syncing the computer's clock to the network. Lastly, the security software must always be up to date to thwart malware attacks.
Failure of the computer clock to keep time may be an indication of an underlying problem in the machine.