Sample Header Ad - 728x90

RTC and System clock not in sync

15 votes
5 answers
74259 views
How to set the system clock sync with RTC (Hardware Clock / BIOS). I am writing a script that uses a system clock in order to start the system with alarm. For this the sole requirement is to have a proper RTC clock. On my test system (SLES 10 SP4), I use NTP Server to manage the system clock. But the RTC clock is always ahead. So for example : currently the system clock shows 14:00 26.05.2016 and the RTC shows 16:00 Hrs. I read the man pages of hwclock and it shows that following command
hwclock --systohc --localtime
would sync the RTC clock to system clock. Which it did. But after a reboot/shutdown, when the system comes up again, the RTC is again messed up. So there is something more which controls the RTC when the system is rebooted. Could someone point me in the right direction. Thanks in advance.
Asked by Sachin H (171 rep)
May 26, 2016, 01:01 PM
Last activity: Feb 15, 2025, 07:59 PM