Last active
January 27, 2023 09:09
-
-
Save sinewalker/644ddc538434aa95d6e586ba0f28c94a to your computer and use it in GitHub Desktop.
Make Windows 7+ use UTC Real-time-clock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation] | |
"RealTimeIsUniversal"=dword:00000001 |
To revert:
- set
"RealTimeIsUniversal=-
(minus) in the registry file and re-import it sc config w32time start= demand
In Linux (systemd), you can also set/disable local time in the RTC. Perhaps you want to leave Windows alone and tweak Linux instead? But UTC is recommended if you can:
sudo timedatectl set-local-rtc 1
(enables. 0 disables).
After doing one of these, reboot, and make sure that the RTC is set correctly from the BIOS/UEFI firmware
Here's a command prompt one-liner for the same effect:
reg add HKLM\System\CurrentControlSet\Control\TimeZoneInformation /t REG_DWORD /v RealTimeIsUniversal /d 1
Just a note that you cannot run sc config w32time
within a Powershell prompt, it needs to be the true Command Prompt. Alternatively, you can use Invoke-Command
to run sc.exe
within Powershell.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is preferred if you have a dual-boot system that runs Windows as the alternate OS. Otherwise your RTC will get reset to the wrong time when Windows runs (and Windows will have the wrong idea of the time too, because it assumes RTC is local when it boots).
You also need to turn off the Windows Time Service (which writes to the RTC in local time despite the above registry setting), with this command from a prompt:
sc config w32time start= disabled