Time Sync Issue

luxmux

New Member
Oct 6, 2023
9
0
1
Hello,
I'm currently running my proxmox v.8 on 9020m Opiplex Dell machine. After an install I noticed that my proxmox tasks in the bottom and the CPU and GPU monitoring is providing wrong time.
When I ssh to server and check the time with date command it gives me proper time. When I go to web interface, under pve1 System / Time, server time is correct. Syslog is correct as well, however the time when I go to summary and look for CPU usage the time is 5 hours different. I attached images for better view. You can see that two times are different.

One more thing, my VMs have correct time, but my Pi-Hole that is running on one of them is reporting a 5 hour difference, same as log CPU usage file.

I just changed my cmod battery on computer, make sure bios is updated, best possible, and the time on bios is correct.


Any suggestions and help?
Thank you
 

Attachments

  • time.png
    time.png
    11.4 KB · Views: 33
  • syslog.png
    syslog.png
    53.7 KB · Views: 30
Last edited:
The summary graphs are showing UTC time, while System -> Time shows your local time.

One more thing, my VMs have correct time, but my Pi-Hole that is running on one of them is reporting a 5 hour difference, same as log CPU usage file.
The Pi-Hole VM is probably using the local time for RTC. This can be fixed by toggling VM -> Options -> Use local time for RTC
 
The summary graphs are showing UTC time, while System -> Time shows your local time.


The Pi-Hole VM is probably using the local time for RTC. This can be fixed by toggling VM -> Options -> Use local time for RTC
I changed that to yes, and I also synced RTC with local on vm manually as well, still didn't fixed the pihole issue.

Now that you mentioned UTC, I read on another thread that, PVE host expects the BIOS clock to be set to UTC. PVE will add then a time zone so you get a correct localtime. Now I could try to manually adjust time in BIOS, but do you know a way or command to change for PVE to use local time, instead of adding time to BIOS time to get to UTC?
I feel fixing the Proxmox will fix other VM services as well.

Thanks
 
I changed that to yes, and I also synced RTC with local on vm manually as well, still didn't fixed the pihole issue.
Pi-Hole runs on Linux and Linux interprets the RTC as UTC time by default. Which means, "Use local time for RTC" needs to be set to No on that VM.

Now I could try to manually adjust time in BIOS, but do you know a way or command to change for PVE to use local time, instead of adding time to BIOS time to get to UTC?
To interpret the RTC as the local time use this command: timedatectl set-local-rtc 1
Note that doing this is not recommended and can cause problems when the PVE node is part of a cluster, because every node in the cluster needs to have a synchronized time.
 
Last edited:
Pi-Hole runs on Linux and Linux interprets the RTC as UTC time by default. Which means, "Use local time for RTC" needs to be set to No on that VM.


To interpret the RTC as the local time use this command: timedatectl set-local-rtc 1
Note that doing this is not recommended and can cause problems when the PVE node is part of a cluster, because every node in the cluster needs to have a synchronized tim
So in order to have graphs set to local time instead of UTC what would be a best option instead of setting RTC to local time?
Because I just noticed that all the instances in my proxmox are affected, even portainer, wazuh and other monitoring tools.
I feel there is some easy fix I just can't find it.
 
Is your client machine in the same time zone as the Proxmox VE host?
The summary graphs translate the time to the client time zone.

Regarding the time inside the VMs, that can usually be fixed by setting "Use local time for RTC" to No, except for VMs running Windows. Or just set "Use local time for RTC" to default and set the "OS Type" to either Linux or Windows accordingly.
 
Last edited:
Is your client machine in the same time zone as the Proxmox VE host?
The summary graphs translate the time to the client time zone.

Regarding the time inside the VMs, that can usually be fixed by setting "Use local time for RTC" to No, except for VMs running Windows. Or just set "Use local time for RTC" to default and set the "OS Type" to either Linux or Windows accordingly.
Yes my client machine is set to correct time zone and bios is on local time. I did saw on other threads that setting my proxmox RTC to local might solve it but its not advisable.
Is there any setting for graphs & monitoring time zone within interface?
Thank you for the assistance
 
Is your client machine in the same time zone as the Proxmox VE host?
The summary graphs translate the time to the client time zone.

Regarding the time inside the VMs, that can usually be fixed by setting "Use local time for RTC" to No, except for VMs running Windows. Or just set "Use local time for RTC" to default and set the "OS Type" to either Linux or Windows accordingly.
I checked browser setup and all browsers and even different devices I tried, are on local time
 
Is there any setting for graphs & monitoring time zone within interface?
There is no setting to change the time zone of the summary graph. It uses the client time.
 
Wouldn't really know what the issue is, but I did full reinstall of the software, change the cmod battery and upgraded the bios. After all that, and new fresh install. Everything seems to run fine. Thank you for all the support, and apologize for this confusing problem. Didn't know it would be this complicated
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!