(iseries)

Set the time zone for all of the application servers running under a user profile

We can update the user.timezone property in the properties file for a user profile to set the time zone for all of the application servers running under that user profile. Setting this property ensures that all application components running under that profile use the same time zone.

Verify that extended National Language Support (NLS) is installed on the IBM i server. If extended NLS support is not already installed, install it by selecting option 21 when you install the base operating system (5769-SS1).

In some application environments, it is important that all of the application servers running under a user profile use the same time zone. If this is the situation, before starting the application servers, we can either update the user.timezone property in the SystemDefault.properties file for a specific user profile.

The value specified for the user.timezone property in a user profile properties file overrides any system locale setting for the application servers running under that user profile.gotcha

  1. Edit the SystemDefault.properties file located in the /home/user_ID directory. If the file does not exist, create a SystemDefault.properties file in that directory.

  2. Change the value specified for the user.timezone property to the correct time zone. If this property does not exist, add it to the file.

    The syntax for setting the property is user.timezone=timezone, where timezone is the supported value for the appropriate time zone.

    The Java Virtual Machine (JVM) calculates the time based on the value of the user.timezone property and the QHOUR and QUTCOFFSET system values. QUTCOFFSET represents the number of hours' difference between the system's time zone and Greenwich Mean Time (GMT). The JVM adds the values of QHOUR and QUTCOFFSET to calculate GMT, and then uses GMT and value of the user.timezone property to derive the correct time.

  3. Save the changes.


Results

All of the components of the application servers running under this user profile use the time zone specified for the user.timezone property.


What to do next

Stop and restart the application servers running under this user profile. We must restart these servers for the change to take effect.


Related tasks

  • Set the same time zone for all of the JVM processes

  • Time zone IDs that can be specified for the user.timezone property