Non-working time-sync in containers/MobyLinux

Expected behavior

Time in MobyLinux or started containers is (and stays) in sync with host-time of the Windows-System.

Actual behavior

After fresh restart the time is in sync, after Windows-suspend or other actions without restart of Docker4Win the time is not in sync anymore.
docker run -it --rm alpine sh
/ # date
Thu May 26 03:14:12 UTC 2016

Restart docker (nothing else!)
docker run -it --rm alpine sh
/ # date
Thu May 26 09:49:29 UTC 2016

1 Like

I have the same problem again. After suspended my laptop for > 1 hour, the result is:
docker run -it --rm alpine sh
/ # date
Thu May 26 13:08:54 UTC 2016

The current date/time is Thu May 26 14:58:54 UTC 2016.

Does the guest not re-sync some time after you wake up your computer?

I don’t think so. Also after approx. an hour the time is not resynced. What do you mean with some time?
The time-sync in hyper-v is enabled, but it seems not to work.

Just to be sure, you’re saying time-sync is enabled in integration services?

That is right, the Time synchronization is activated (all checkboxes have the same state on my system like in your screenshot).
I have made one more test. I have disabled and reenabled time synchronization (toggle the corresponding checkbox in hyper-v manager) without restarting docker. Now the time in a fresh startet alpine container is correct again (was strong shifted before in a fresh started alpine container because of laptop in suspend mode over night).
So I have to retrigger time-sync after every suspend with toggling the checkbox?

One more question:
Is the time-sync service in the MobyLinux guest running? After some searches and reading some articles I understand, that the Hyper-V is only responsible for correcting the time on guest-startup and so on - this is also working.
The time-sync for a running guest is only working, if time-sync inside the guest is running. See http://www.altaro.com/hyper-v/hyper-v-time-synchronization/

We do have the time synch feature enabled and it should be handled by the Linux kernel

I have the same problem. Have you found any solution? Thanks

agreed – definitely not working on my build - seems like a bug

Same problem here. Ntpd service was not running. Started it manually and now the time is in sync.

I think this is the same what I’m seeing in this report. Definitely seems like a bug.

Just looked into my Alpine container and indeed the date is completely off. Unchecking and checking back the time sync in Hyper-V fixed it. But this looks like a proper bug.