Off Campus

Michael Greene

Blogs

Windows 7 Gadget – point and click time zone change

  • Comments 5
  • Likes

I travel a LOT and find myself in 2-3 time zones per week.  In Vista, a user could change time zones without elevation but it was nearly impossible to automate the process.  Windows 7 includes a command line utility to make time zone change automation a trivial step.

I authored the attached gadget as a simple way for me to swap time zones when travelling.  I have since grown dependant upon it so I wanted to post to the blog to share with others and so it never gets lost…  :-)  Note: if it downloads as a (dot)zip file just rename it to (dot)gadget.

The coding is simple (possibly too simple to the point of redundancy).  I just call tzutil.exe and pass a time zone.  If you are in Arizona or Indiana, you may want to tweak things a little to account for the daylight savings time exceptions in those states.  You could also just click the “wrong” zone.

In case you are interested in tzutil.exe and do not have a Win7 machine handy, here are the options.

Windows Time Zone Utility

Usage:
TZUTIL </? | /g | /s TimeZoneID[_dstoff] | /l>

Parameters:
    /? Displays usage information.

    /g Displays the current time zone ID.

    /s TimeZoneID[_dstoff]
       Sets the current time zone using the specified time zone ID.
       The _dstoff suffix disables Daylight Saving Time adjustments
       for the time zone (where applicable).

    /l Lists all valid time zone IDs and display names. The output will
       be:
           <display name>
           <time zone ID>

Examples:
    TZUTIL /g
    TZUTIL /s "Pacific Standard Time"
    TZUTIL /s "Pacific Standard Time_dstoff"

Remarks:
    An exit code of 0 indicates the command completed successfully.

Attachment: timezone.gadget
Comments
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment