11/17/2022, 3:52 PM
Hello. I have an issue with rancher desktop on macos where the time between my docker container (and host VM) has a skew of about 1s with the host machine. Is there anyway to fix that? Forcing synchronisation with ntpd didn't improve the situation. Is there a way to manually set the time to the same time as the host machine?


11/17/2022, 5:55 PM
This was an issue with older versions of Rancher Desktop and has since been patched AFAIK you shouldn't need to be concerned with syncing time.. Can you provide more details on your environment and version of Rancher Desktop? We might need to know more in order to get a better idea of what might be going on.


11/17/2022, 8:15 PM
I am running the latest version of rancher desktop
I am concerned about time synch because I have run a db in a docker container, and run tests outside of the container that depends on timing
The time skew make the test flaky
One think i noticed is that running
rdctl she'll date -u -Ins
return a time with no milliseconds. But running this against the docker container `docket exec -it containerId date -u -Ins, the milliseconds are there. Is it possible that the VM which running the docker container has not enabled that kind of time precision at the kernel level? That would be enough to screw up the time by about 1 second


11/17/2022, 9:25 PM
There is code in lima to try to keep the time in sync with the RTC, but it only fixes the time if the drift is more than 2s: Add hwclock sync loop to the guestagent by mikluko · Pull Request #490 · lima-vm/lima
There have been reports that the sync doesn't always work, e.g. Clockdrift in the created guest · Issue #850 · lima-vm/lima
You should add a comment there that you are affected as well, but I'm afraid there is no short-term fix 😞