Ubuntu keeps displaying UTC time despite setting timezone
Solution 1
You need to reconfigure timezone data.
sudo dpkg-reconfigure tzdata
Solution 2
Go to System Settings > Time % Date and set your location (in my case Paris)
The select the Clock tab and check both Time in auto-detected and Time in other locations. Then select Choose Location and add in (say) UTC or any other location you may require.
Then you will be able to select the time and date on the top bar with left clock of the mouse and select which time you wish to have displayed.
Related videos on Youtube
wheeler
Updated on September 18, 2022Comments
-
wheeler over 1 year
Something appears to be broken with regards to how Unity displays the system time in the current time zone. I am running an Ubuntu 16.04 guest in VirtualBox, on a Windows 10 host. I have changed the timezone by linking
/etc/localtime
to/usr/share/zoneinfo/America/New_York
(becausesudo timedatectl set-timezone America/New_York
didn't do anything). When I executetimedatectl
, it reports the proper time and timezone:$ timedatectl Local time: Mon 2018-11-12 10:54:13 EST Universal time: Mon 2018-11-12 15:54:13 UTC RTC time: Mon 2018-11-12 15:54:12 Time zone: America/New_York (EST, -0500) Network time on: yes NTP synchronized: no RTC in local TZ: no
However, for whatever reason, Unity is still incorrectly reporting the time in UTC time, even after rebooting the VM:
How do I get Unity to properly display the time in the local timezone?
-
Joshua Besneatte over 5 yearshave you tried setting your timezone from the settings gui?
-
wheeler over 5 yearsYes, but it had no effect.
-
abu-ahmed al-khatiri over 5 yearsi think you forgot to add a argument
--adjust-system-clock
-
-
24601 over 5 years@wheeler If this answer solved the issue for you, perhaps you might be kind enough to mark it off as the best answer which will aid other users with similar issues. Thankyou.
-
wheeler over 5 yearsThe system clock is not in local time, as noted by the screenshot of
timedatectl
. -
wheeler over 5 yearsPerforming the steps you have outlined had no effect.
-
wheeler over 5 yearsRunning
sudo timedatectl set-local-rtc 1 --adjust-system-clock
yieldsFailed to set local RTC: Access denied
. -
abu-ahmed al-khatiri over 5 years@wheeler as mentions the output of your command
timedatectl
, you get: Access denied
couse not yet activated your RTC, did you try my answered? -
wheeler over 5 yearsYour answer is not clear. I tried disabling NTP with the first command, and then ran
timedatectl set-local-rtc ...
-
wheeler over 5 yearsHoly frick that did it. I am going to run through the same steps to ensure that solved the problem.
-
dataviews about 4 yearsconfirmed this worked for me on AWS ec2 ubuntu distribution. thank you :)