I am running a Windows Server in my account, and the system time is consistently off by a number of hours.

The issue here is the emulation of the hardware clock by the virtualization system.

On Linux and other Unixes, the convention is that the hardware clock is permanently set to UTC (i.e. GMT without DST), and the operating system adjusts this for display.

On DOS and Windows, the convention is that the hardware clock stores local time, and that the operating system adjusts this when DST starts and ends.

We cannot support both of these behaviours, since our virtualization layer does not know what operating system it will boot when it sets up the virtual hardware to start a server. We have chosen the UTC behaviour.

To fix this on Windows 2008 and above, we recommend that you tell Windows to use the Unix method as follows:

  • Open an administrative command prompt. In Windows 2008, this can be found in the ‘Accessories’ section of the start menu – you’ll need to right click and select ‘Run as Administrator’.
  • Set the boot manager to use the platform clock. This should instruct Windows to use the PM timer for the primary clock source. The system UUID ({default} in the example below) should be changed if the system UUID is different than the default boot device.

C:\Windows\system32>bcdedit /set {default} USEPLATFORMCLOCK on

Older versions of Windows (2003 and below) handle this differently: one recommended solution involves a registry setting of 

RealTimeIsUniversal=1

, which you can apply to make Windows adopt the Unix behaviour.