Setting the time zone
The TZ environment variable specifies the 'local' time of a system. You can set this for a JVM server by adding it to the JVM profile. If you do not set the TZ variable, the system defaults to UTC.
When setting the time zone for a JVM server, you should be aware of the following issues:
- The TZ variable in your JVM profile should match your local MVS system offset from GMT.
- Customized time zones are not supported and will result in failover to UTC or a mixed time zone output in the JVMTRACE file.
- If you see LOCALTIME as the time zone string, there is an inconsistency in your configuration. This can be between your local MVS time and the TZ you are setting, or between your local MVS time and your default setting in the JVM profile. The output will be in mixed time zones although each entry will be correct.
Using the POSIX time zone format
The POSIX time zone format has a short form and a long form. You can use either to set the TZ environment variable, but using the short form reduces the chance of input errors.Example long
form:
TZ=GMT0BST,M3.5.0,M10.5.0
Example short
form:
TZ=GMT0BST
To find out what time zone your system is running on,
log on to USS and enter echo $TZ. The result is the long form of the value your TZ
environment variable should be set
to.
/u/user:>echo $TZ
GMT0BST,M3.5.0,M10.4.0
For a more detailed breakdown of the POSIX time zone format, see POSIX and Olson time zone formats on the IBM developerWorks site.