The hardware clock in my virtual machine is the local time reported by my host (the local time is 10:14, but my VM incorrectly reports 6:14 as the local time):

enter image description here

When I use sudo timedatectl set-local-rtc 1, the local time of the VM does not change. For whatever reason, set-local-rtc changes the RTC time, rather than reversing/advancing the local time appropriately:

enter image description here

How do I get the local time in my VM to accurately reflect the local time of the host, given that the hypervisor is reporting a HW clock as the local time?


I tried running sudo timedatectl set-local-rtc 0` for good measure, and that just sets the RTC back to the local time:

enter image description here


Updated :
That will solved with,

sudo timedatectl set-local-rtc 1 --adjust-system-clock
  • Still does not work. Local time is still set to 6:14. – wheeler Aug 10 '18 at 14:27
  • what that's said output sir? – abu-ahmed al-khatiri Aug 10 '18 at 14:27
  • The same as the first screenshot (well, 6:25 since time goes on, I can't seem to post an image in the comments) – wheeler Aug 10 '18 at 14:28
  • just edit your question with output, try restart your VB sir – abu-ahmed al-khatiri Aug 10 '18 at 14:30
  • Added to the original question – wheeler Aug 10 '18 at 14:36

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.