use PowerShell to reset the system clock

I have a dual boot Windows 10 Pro/Ubuntu 18 laptop. Every time I reboot from Ubuntu to Windows, Windows sets my system clock ahead by  8 hours and says it is California time.

I am a Windows Insider, and I complained about this bug for several years with no results. I guessed that Windows PowerShell would be able to control the clock. A Google search gave me a link to a detailed description of the Set-Date command: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/set-date?view=powershell-6

An example showed exactly how to adjust the system clock. Execute PowerShell in administrative mode:

PS C:\WINDOWS\system32> set-date  -adjust  -8:0:0
Saturday, March 16, 2019 1:39:17 AM
PS C:\WINDOWS\system32>
This magic one-liner saves me a lot of time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s