Thinstation TIME_ZONE won't work

In the thinstation configuration file (thinstation.conf) there is a configuration option which is called TIME_ZONE. This option is designed to allow the user to specify the time zone for which the thinstation should use as local time. When attempting to set our timezone, which should be GMT-7:00 (Canada Mountain time), no matter what I tried to put in as that TIME_ZONE setting, the time would always be in the wrong timezone. I figured out that when I entered MST-7 (which should set it to GMT - 7 hours), the time on the thinstation would end up being UMT + 7 hours.

After much searching, I downloaded the thinstation source and tracked down how this time zone was being set. It appears that the TZ environment variable is just being set to what you provide in the TIME_ZONE variable. I found this site which provides an explanation on the syntax for the TZ environment variable. I tried this syntax and it still didn't work. At this point I realized I was obviously missing something critical, so I decided to use the second syntax which is shown at the bottom of that TZ variable document.

The linux system I was using was Debian which contained zoneinfo files which are binary files used to set the timezone in many different places around the world. I copied all the zoneinfo files into the folder <thinstation root>/packages/base/etc and then set my TIME_ZONE setting to ":/etc/zoneinfo/Canada/Mountain" (you would obviously change the Canada/Mountain to your time zone). This tells the system to use that binary file to set the time zone information. This worked perfectly and the thinstation system now has the correct local time.

The zoneinfo information which I copied off my Debian system can be downloaded and compiled separately if you don't have it on your local system. Download the zoneinfo files here.

It took me a while and a lot of CD-Rs to figure this one out, so if you have any questions, please post them using the comment system below.


Author: DPAK
Created: Nov 24 2005
Categories: Thinstation
TechByte #91

Warning: By visiting this site and/or by using any information contained herein, you agree to the Techbytes.ca terms of use.



Add a comment about this TechByte

If you wish to add a comment regarding this TechByte, please use the form below. Please note that by submitting comments using this form you are allowing all of the information submitted to be visible on this website. Any comments submitted using this form will only be shown on the website if they are approved by the administrators of this site. IF APPROVED, COMMENTS MAY TAKE SEVERAL DAYS TO BE POSTED.

Posted By: (Optional)

Comments:


Other TechBytes: