How do I set the timezone from command line ? How do I set the timezone from command line ? windows windows

How do I set the timezone from command line ?


The command line utility that helps you change the time zone in Windows 7 is tzutil.exe and is known as Windows Time Zone Utility. This is a great tool for all the people who prefer working from the command prompt.

Use the /s parameter to set the time zone:

tzutil /s "universal standard time"

Use the /g parameter to get the time zone:

tzutil /g

Use the /l parameter to list the valid time zones.

tzutil /l

[source]


If anyone still uses Windows XP (as I do):

Step 1:

You can use the following command line, e.g. in the "Execute" window (cmd):

Control.exe TIMEDATE.CPL,,/Z W. Europe Standard Time

Where "W. Europe Standard Time" is, not really surprisingly, for Western Europe. Other possible values are e.g.

  • E. Europe Standard Time (for Eastern Europe)
  • Pazifik Standard Time (for what it says)

and so on. A list of possible values can be found here (although for Windows Vista, but it seems most values are the same):

https://technet.microsoft.com/en-us/library/cc749073%28v=ws.10%29.aspx

Step 2

In order to run the above command from a shortcut, you can do the following:

Create a new shortcut (e.g. in Windows explorer, right-click anywhere in an empty area, and choose "New shortcut") and give it the following value (by entering the code into the window that opens, or as "target" in the accordingly named field):

C:\Windows\System32\cmd.exe /c Control.exe TIMEDATE.CPL,,/Z W. Europe Standard Time

(The example uses W. Europe Standard Time; change this to your liking)

Calling this shortcut (i.e. clicking the Icon) immediately changes the timezone.

For my needs, I created two such shortcuts, one setting the timezone to Western Europe, the other setting it to Eastern Europe, as these are the locations where I am working regularly.

(Source for Step 2: Run a Command Prompt command from Desktop Shortcut)


If you have PowerShell 5.1, you have the equivalent of tzutil in PowerShell. For example, if you have Windows 10.

Examples:

See current time zone:

Get-TimeZone

See available time zones:

Get-TimeZone -ListAvailable

Set a time zone:

Set-TimeZone -Name "Georgian Standard Time"

Source: https://www.sysadmit.com/2019/08/cambiar-zona-horaria-Windows.html