I have a small problem with my home machine.
The Bios time does not seem to be getting updated with the system time.
If I set the time correctly all is fine until I reboot at which point the system time reverts to whatever the bios says it is. Naturally I could go into the bios and reset the time manually but I am interested to find out why it's not getting set by the OS.
Does anyone know how the Bios time is updated as the date -s command only seems to affect the system time.
Regards
Wayne
On Tue, 1 Jul 2003, Wayne Stallwood wrote:
I have a small problem with my home machine.
The Bios time does not seem to be getting updated with the system time.
If I set the time correctly all is fine until I reboot at which point the system time reverts to whatever the bios says it is. Naturally I could go into the bios and reset the time manually but I am interested to find out why it's not getting set by the OS.
Does anyone know how the Bios time is updated as the date -s command only seems to affect the system time.
Regards
Wayne
When the machine shuts down, it should execute a clock -w
Try that from the commandline. clock -r reads the system clock.
Sounds like your BIOS battery is dying if it's not storing the time though.
Chris
Chris Glover chris@glovercc.clara.co.uk writes:
When the machine shuts down, it should execute a clock -w
Try that from the commandline. clock -r reads the system clock.
Sounds like your BIOS battery is dying if it's not storing the time though.
Use NTP and (almost..) never care about the BIOS clock again...
On 03-Jul-2003 Richard Kettlewell wrote:
Chris Glover chris@glovercc.clara.co.uk writes:
When the machine shuts down, it should execute a clock -w
Try that from the commandline. clock -r reads the system clock.
Sounds like your BIOS battery is dying if it's not storing the time though.
Use NTP and (almost..) never care about the BIOS clock again...
... but if the BIOS clock is a long way out NTP will refuse to reset the system time. You have to be within an hour or so of the correct time to start with.
On Thu, Jul 03, 2003 at 09:44:28AM +0100, raph@panache.demon.co.uk wrote:
On 03-Jul-2003 Richard Kettlewell wrote:
Use NTP and (almost..) never care about the BIOS clock again...
... but if the BIOS clock is a long way out NTP will refuse to reset the system time. You have to be within an hour or so of the correct time to start with.
Not if you run ntpdate first (put it in a startup script before ntpd runs)
Adam
On Tue, Jul 01, 2003 at 01:19:26AM +0000, Wayne Stallwood wrote:
I have a small problem with my home machine.
The Bios time does not seem to be getting updated with the system time.
If I set the time correctly all is fine until I reboot at which point the system time reverts to whatever the bios says it is. Naturally I could go into the bios and reset the time manually but I am interested to find out why it's not getting set by the OS.
You need to use hwclock to set the hardware clock.
hwclock --systohc Set the Hardware Clock to the current System Time.
Thanks to everyone for those suggestions.
I have updated my BIOS time now, and later I am going to trawl through the init scripts to see why this doesn't happen at shutdown.
Somebody suggested that my CMOS battery may be on it's last legs, hence why the BIOS was behind in the first place.
Maybe this is the case,but then if the init scripts (I assume this is where it is done) aren't syncing the Bios time to the system time at shutdown then it is quite probable that the BIOS hasn't had it's time set in over two years.
Regards
Wayne