Thursday, 14 February 2013

Change timezones fast

In Windows 7 it usually takes at least six clicks to change time zones.

If you need to switch between zones quickly, the following tip will help.

Why might you need to swap between time zones frequently and fast?

When I schedule meetings I like to see how things stack up in Outlook. Meetings abroad, and flight schedules, can make things tricky. Changing  time zones on the computer restores some sanity to the proceedings.

Outlook has a (well-buried) option for changing the time zone and it's just as easy (and tedious) as using the Windows Date and Time window.

Luckily there's an easier way.

Windows 7 includes a command-line tool called Tzutil. Here's how I've used it to make a handy toolbar-based time zone swapper.

1. Create a file for each time zone

Create at least two empty text files and name them according to the time zones between which you wish to switch.

In this example we'll move between GMT (GMT Standard Time) and PST (Pacific Standard Time), so the files are called GMT.txt and PST.txt.

In each file enter the following command, replacing the string in quotes with the one you need*:

tzutil /s "GMT Standard Time"

Now rename the files, replacing the .txt suffix with .bat.

You should have two files called GMT.bat and PST.bat.

2. Install the files

Move the new batch files to a folder on your computer. Let's create C:\TZ and move the files into that.

3. Create the toolbar

Right-click the Taskbar and hover over Toolbars. Click New toolbar and navigate to C:\. Choose the C:\TZ folder and click Select Folder.

You should now see the letters TZ on your Taskbar, next to a pair of tiny arrows. Click once on these to show the available time zones.

To set a new time zone click once on any of the visible icons.



The icons above are actually renamed Windows shortcut files that point to my batch files. I changed the icons by opening each file's Properties and using the Change Icon option.

* Time code list
To obtain a full list of valid time zone codes run Tzutil from the command line like this (the last character is a lower-case L, not the digit one):
C:\>tzutil /l

...

(UTC-09:00) Alaska
Alaskan Standard Time

(UTC-08:00) Baja California
Pacific Standard Time (Mexico)

(UTC-08:00) Pacific Time (US & Canada)
Pacific Standard Time

(UTC-07:00) Arizona
US Mountain Standard Time

(UTC-07:00) Chihuahua, La Paz, Mazatlan
Mountain Standard Time (Mexico)

...

So to make a PST file, you'd type the following into the file:

tzutil /s "Pacific Standard Time"