Fix for my Docker image create dates being 8 hours in the past
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.
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
- Create a new Docker image – the create date is correct, the current time
- Sleep the PC
- Wake up the PC
- 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.