Q:

Time has an offset of two hours on windows container with Docker

Using Visual Studio 2017, I added Docker support with Windows container to a simple asp.net core application.
When I run the application, the values of DateTime.Now and DateTime.UtcNow are 2 hours later than the expected values. (Instead of 1:00 UTC, it's 3:00 UTC)
If I use Docker with Linux containers, the time is correct.
How is the time managed in the windows container and how can I synchronize it with the host?

A:

After much research, I found a post on Moby's github : https://github.com/moby/moby/issues/37283
It appears to be a bug on windows images where you get the wrong time if your timezone is east of PST. A fix is expected in september 2018.

