I have been having a look at Docker for Windows recently. I have been experiencing a problem that when I create a new image the created date/time (as shown with docker images) is 8 hours in the past.

image

Turns out the problem seems to be due to putting my Windows 10 laptop into sleep mode. So the process to see the problem is

  1. Create a new Docker image – the create date is correct, the current time
  2. Sleep the PC
  3. Wake up the PC
  4. Check the create date, it is now 8 hours off in the past

Now the create date is not an issue in itself, but the fact that the time within the Docker images is also off by 8 hours can be, especially when trying to connect to cloud based services. I needed to sort it out

Turns out the fix is simple, you need to stop and restart the Docker process (or restarting the PC has the same effect as this restarts the Docker process). Why the Docker process ends up 8 hours off, irrespective of the time the PC is slept, I don’t know. Just happy to have a quick fix.