Monday Jul 30, 2007

Time Zone Redirection and Sun Ray Connector

Suppose you had a centrally located Windows Terminal Server, but you had clients that accessed this terminal server that resided in different time zones than the terminal server.  By default, the time that their programs see would be the time zone of the terminal server.  This can can cause problems with Outlook, or other time sensitive applications.

Microsoft supports a feature called Time Zone Redirection, however it's disabled by default.  Typically if you are doing things the right way you'd have an Organizational Unit (OU) of Terminal Servers (TS) and you could enable TZ Redirection only for that OU via the AD Users and Computer snap in.  However, you can also do it on a TS by TS basis by firing up MMC and doing a local group policy.  Here's the changes you want to make to either the local or group policy:

  1. Select the group policy object you want to edit.
  2. Click Computer configuration, Administrative Templates, Windows Components, Terminal Services, Client Server Data Redirection.
  3. Open Allow Time Zone Redirection.
  4. Click Enabled.
  5. Click OK.

Note:  Changes to this setting only apply to new Windows Terminal Server sessions.

Now, let's throw another wrench in the fan.  The above works great when you have a fat client (that includes Wyse, Neoware, etc) as they keep their own clock because they have an OS and on that local OS the RDP client  runs so that's where the time zone is determined.

What if you had a Sun Ray Server on the West Coast, a Terminal Server in the midwest, and a Sun Ray on the East Coast?  Even with the above changes, the TS Session is going to reflect the Pacific time zone since the Sun Ray Server is the client because that's where the RDP client runs and therefore where the TZ is determined.

What we want though is to have the TS Session reflect the Eastern time zone, otherwise the users time sensitive applications are going to be really messed up.  Mail will have the wrong time stamps, they'll be late for appointments, etc.

What you can do is change the time zone variable on the fly.  You can even automate this so a look up is done in the Sun Ray Data store for this particular Sun Ray.  Meaning you could store the time zone information in the other or location field of the DTU.  If you only had a few you could do a simple if/then script based on the MAC address as well.

For the sake of this example let's say that we stored the time zone information in the location field of the Sun Ray Data Store for a particular Sun Ray that is on the East Coast.  That means in the location field for this Sun Ray we have the words "US/Eastern".  Then we could do the following script:

#!/bin/sh
MYDISP=`echo $DISPLAY | awk -F: '{print $2}' | awk -F. '{print $1}'`
MYMAC=`grep TERMINAL /tmp/SUNWut/config/dispinfo/$MYDISP | awk -F. '{print $2}'`
MYTZ=`/opt/SUNWut/sbin/utdesktop -Lc |grep $MYMAC | awk '{print $5}'`
if [ "$MYTZ" ];then
TZ=$MYTZ;export TZ
fi
/opt/SUNWuttsc/bin/uttsc <options>

What you'd get then is what is demonstrated in the screen shot below.  While the Sun Ray Server is actually on the Pacific time zone, we've changed the TZ variable under Solaris (or Linux) to reflect the Eastern time zone and that's what is reflected in the Terminal Server Session.  This works just fine in Kiosk/CAM mode as well, it's just easier to illustrate from a normal session since we can see both clocks.  Remember though, you must have TZ Redirection enabled on the Terminal Server and Sun Ray Windows Connector 1.1 or greater for this to work.



 

About

Think Thin is a collection of bloggers that work with Oracle's Virtual Desktop portfolio of products.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today