Ubuntu 15.04 and later uses systemd
as the default init system and includes the timedatectl
program. Running timedatectl
will output:
Local time: Tue 2016-02-02 09:47:54 MST
Universal time: Tue 2016-02-02 16:47:54 UTC
RTC time: Tue 2016-02-02 16:47:54
Time zone: America/Denver (MST, -0700)
Network time on: yes
NTP synchronized: no
RTC in local TZ: no
RTC time
is the hardware clock. Compare it to the Local time and Universal times returned by timedatectl
to determine how the hardware clock is set.
RTC in local TZ: no
means the hardware clock is interpreted as UTC
RTC in local TZ: yes
means the hardware clock is interpreted as local time
To switch using timedatectl
sudo timedatectl set-local-rtc 0
sets RTC to UTC
sudo timedatectl set-local-rtc 1
sets RTC to local time
Switch using config file
Setting the UTC=
setting in /etc/default/rcS
will change how the system interprets the hardware clock (UTC=yes
or UTC=no
).
grep -i utc /etc/default/rcS
say?UTC=no
so I assume it was changing it based on the localtime. I changed that toUTC=yes
and now the clock is working properly.