4

I have an Ubuntu Server 18.04.1 LTS in a lab environment where I need to set the date a couple of years back in time (e.g. 2016-04-22). I can set the older date/time without any issues but the OS always resets the date/time to 2018-01-28 15:58 whenever I power the server back on. How can I prevent this?

I found a log message in /var/log/syslog indicating that the OS is switching to the previous build time: systemd[1]: System time before build time, advancing clock.

0

Try disabling the systemd-timesyncd service:

sudo systemctl disable systemd-timesyncd

You can check if the service is running using:

sudo service systemd-timesyncd status

You can stop the service manually (one time) using:

sudo service systemd-timesyncd stop
  • Sadly, the Local and Universal times still get reset to the build time when I reboot. I made your suggested changes then entered: sudo timedatectl set-time "2007-08-10 02:00:00" After the reboot the time was: $ timedatectl Local time: Sun 2018-01-28 15:59:06 UTC Universal time: Sun 2018-01-28 15:59:06 UTC RTC time: Fri 2007-08-10 02:01:25 Time zone: UTC (UTC, +0000) System clock synchronized: no system-timesyncd.service active: no RTC in local TZ: no – Kenzie MacNeil Sep 25 '18 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.