Battery could be weak and cause such issues, but if battery was removed then it would lose the settings if you turned the computer off, but as long as its on it would retain all the info, but it would loose time.
CMOS that stores all this info can go bad as well, that is rare, but does happen, in those cases time for new main board or new computer.