Article
· Jun 17, 2016 5m read

Setting the TZ Environment Variable on Linux

Setting the TZ Environment Variable on Linux

The Update Checklist for v2015.1 recommends setting the TZ environment variable on Linux platforms and points to the manpage for tzset. This is recommended to improve the performance of Cache’s time-related functions. You can find out more about this here:

https://community.intersystems.com/post/linux-tz-environment-variable-not-being-set-and-impact-caché

The manpage on my CentOS 7 test system (RHEL 6 says the same) has this to say:

“The tzset() function initializes the tzname variable from the TZ  environment  variable.   This function is automatically called by the other time conversion functions that depend on the timezone.”

So how do you set TZ? How does it affect the time on a Linux server? Let’s see what we can learn:

The System Timezone --

For my test, I’m using Ensemble 2016.1 on a virtual CentOS system. First let’s check the system timezone. The system-config-date utility can show you.