这是indexloc提供的服务,不要输入任何密码
Skip to content

Wrong date/time again #4526

@davclark

Description

@davclark
  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: 4FDC213A-B7D0-4570-9113-B53E41EE1C7C/20190814201017

Expected behavior

Time remains correct relative to host. This has been discussed already in #72

Actual behavior

During sleep, Docker Hyper-V VM slowly drifts out of sync with host time.

Information

The problem appears to be a re-emergence of #72. Another individual posted a similar comment at the end of #72. It appears to happen reliably during sleep. It only ends up being important when things happen that require time to be coherent with the real world. For example, this can mess up apt update.

  • Windows Version: 10 Pro 1903
  • Docker Desktop Version: 2.1.1.0

Steps to reproduce the behavior

  1. Run Docker for Windows
  2. Sleep the machine for a while
  3. Observe that time gets out of sync

You can check time on the Docker VM like:

docker run -it --rm ubuntu:18.04 date

You can get UTC on Windows PowerShell like:

$Time = Get-Date
$Time.ToUniversalTime()

There is a small chance that this is affected by setting the Windows hardware clock to UTC (which I suspect many Docker users do - since it makes dual-booting linux easier) [per @echadwickb's comment below]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions