Thursday, March 8, 2012

Why is my Citrix XenDesktop virtual desktop agent (VDA) time zone incorrect

Problem

You have just completed configuring your Citrix XenDesktop desktop groups and began testing the virtual desktops on, say, thin clients.  These thin clients are not joined to the domain so they’re simply deployed via images you’ve created and stored on USB keys or a deployment application.  While testing the virtual desktops, you notice inconsistencies between the time on your virtual desktop and your domain controllers.  What’s odd is that you know you wouldn’t have been able to log on if the domain if the time difference was more than 5 minutes, yet the time drift is an hour or more.

Solution

The reason why you’re experiencing time drift which is most likely by hours is because of how Citrix XenDesktop handles the time zone on virtual desktop agents.  By default, XenDesktop uses the client that you’re using to log onto the virtual desktop agent’s time zone setting.  This means that if you log onto your virtual desktop agent with a client configured with, say, Eastern Standard Time but your correct time zone is actually Atlantic Time, you’ll notice that your virtual desktop agent is going to be an hour behind.  To determine whether this applies to your situation, you can simply log onto the desktop, laptop or thin client you’re using to connect to your VDA and check the time zone. 

The following is a screenshot of a virtual desktop’s time compared to a server’s time (the former being incorrect and the latter behind incorrect:

image

The following screenshot is the time zone I have set on the thin client that was used to log onto the thin client and the time difference between the thin client and the server:

image

As demonstrated by the screenshots above, the virtual desktop actually uses the time zone set on the thin client and since the server’s time is set to Atlantic Standard Time while the thin client is set to Dhaka, the time is off by hours.

The solution is to configure a new Users policy under the HDX Policy node within Desktop Studio to use the server time verses the client time:

image

Within Desktop Studio, navigate to HDX Policy –> Users and click on the New button to create a new policy:

image

Navigate to ICA –> Time Zone Control> Use local time of client:

image

Click on the Add button and change the Value drop down box to Use server time zone:

image

Click the OK button and continue with the policy wizard:

image

Apply filters if required:

image

image

image

With the new policy configured, it will no longer matter what the desktop, laptop or thin client’s time zone is configured because your virtual desktop will now use the XenDesktop’s server time:

image

4 comments:

Anonymous said...

What version of XenDesktop was that? We don't have the Time Zone Control option on 5.0.

Terence Luk said...

The version I used in this example is XenDesktop 5.5.

Anonymous said...

Hey Terence

I have a client that still uses XenDesktop 5.6 and they require that they use their own timezones for the Desktops. We have the time working but if they get disconnected and reconnect before the session times out then the desktop reverts back to the server. Any ideas?

Kyrian Arensman said...

works like a charm, also for the new versions (7.1 and 7.5).
thanks! saved me a headache!