Wednesday 6 February 2013

TimeZone Registry Keys Windows 7 / Server 2008

The following registry area contains the users selected timezone information. 

HKLM\System\current control set\control\TimeZoneInformation

The keys are local machine which makes these setting a challenge across a Pooled Virtual Desktop environment.  Citrix helps the situation by having a setting a Citrix Policy that takes the time from the connecting end-point and applying this to the users Xenapp/XenDesktop session. 
This for the most part is good enough, however in a more complex situation users may want a different time on their virtual desktops as to their connecting device. (eg. India Staff Supporting UK users in UK hours)

There is a built in util on Window 7 and Server 2008 called TZUTIL which can be used to instantly change the time zone. 

TZUTIL /G - output the current time zone TZUTIL /L    - this list the available time zones
TZUTIL /s "Time Zone Name"   - Set the time zone (case sensitive)

The script could be used in 1 of 2 ways. 

A) AD Groups for Timezones. Then a logon script/action sets the timezone based on the users AD group membership or user OU.

B) Another way without involving AD group and management overhead would be to run a TZUTIL /G to pipe the users setting to a text-file or Reg Key at logoff time. Then at logon the text file or reg key could be read and the TZUTIL with the set command ran against it. 

2 comments:

  1. Hi.. I have created a script which runs at startup. . Which is working as expected. But whenever vdi is getting disconnected when I reconnect again it's changing the time zone to my local pcs .. any idea an fixing this. ?

    ReplyDelete
  2. Hi, the behaviour is also controlled with Citrix Policys. check thru your policys and it not present add one to control the behaviour as you desire.

    ReplyDelete