In a virtualized environment like Tilaa (KVM), the physical hardware clock (RTC) usually runs on UTC time. Windows, however, expects the hardware clock to run on Local Time by default.
This mismatch causes the system time to jump or drift incorrectly after every reboot. To fix this, you need to tell Windows to treat the hardware clock as UTC, just like Linux does.
Step 1: The Registry Fix (RealTimeIsUniversal)
We need to add a specific registry key to force Windows into "Universal Time" mode.
- Open PowerShell as Administrator.
- Run the following command:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /t REG_DWORD /d 1 /f
Reboot Required:
This change fundamentally alters how Windows reads time from the "BIOS". You must reboot your VPS for the setting to take effect.
This change fundamentally alters how Windows reads time from the "BIOS". You must reboot your VPS for the setting to take effect.
Step 2: Configuring NTP (Time Sync)
After fixing the hardware clock interpretation, ensure your server synchronizes correctly with an internet time source (NTP).
Check current source:
w32tm /query /source
If this returns "Local CMOS Clock", your NTP service is not working correctly.
Force sync with Tilaa/Internet time:
# Stop the service
net stop w32time
# Configure NTP peers (e.g., pool.ntp.org)
w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org"
# Restart and force sync
net start w32time
w32tm /resync