System Time Being Reset On Reboot (mysteriously)

5,107

I had the same issue!

What I have done to fix it?

I changed /etc/adjtime to

LOCAL

instead of UTC

After that, I rebooted my pc, entered the BIOS and set again the correct data and time.

It seems to be fine now, my systems is Debian Jessie

Share:
5,107

Related videos on Youtube

Jeff Schaller
Author by

Jeff Schaller

Unix Systems administrator http://www.catb.org/esr/faqs/smart-questions.html http://unix.stackexchange.com/help/how-to-ask http://sscce.org/ http://stackoverflow.com/help/mcve

Updated on September 18, 2022

Comments

  • Jeff Schaller
    Jeff Schaller over 1 year

    I have an issue where the date/time I set with timedatectl and date -s are not preserved on reboot. I set the date using date -s, set the time using timedatectl set-time, and use hwclock --systohc. After rebooting, the hwclock still shows the time I set, but the system time reverts to the old localtime.

    Looking at journalctl, I can see the bootup process starts with the time I had set (hwclock time), but partway through there is a message about the time changing: systemd[1]: Time has been changed

    After this message, the timestamps all reflect the updated time.

    Some notes about this system:

    • The system is running RHEL 7.2
    • Chrony is not installed
    • The system is not connected to any network
    • I have tried removing /etc/adjtime before rebooting, but the time resets anyway

    I would like to understand what process/service/etc is responsible for setting the system time during bootup so I can further investigate where it is getting the time from.