I'm trying to set the system time to UTC such that when I log in and run date
, or run programs that ask for the current time (say, python -c 'import datetime; print datetime.datetime.now()'
), they return times in UTC. Based on searching and https://askubuntu.com/a/524362, I expect that when I run
sudo timedatectl set-timezone UTC
the system time will be set to UTC. That program exits with 0 when I run it and timedatectl status
prints the following output:
$ timedatectl status
Local time: Wed 2016-03-16 14:31:50 UTC
Universal time: Wed 2016-03-16 14:31:50 UTC
RTC time: Wed 2016-03-16 14:31:49
Time zone: UTC (UTC, +0000)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
However, when I log out, log back in, and run date
, I still get a value in EDT:
$ date
Wed Mar 16 10:31:32 EDT 2016
What am I doing wrong?