Set the time zone

To ensure that the application server runtime and your J2EE application components have the correct date and time values, set the user.timezone property. The syntax of the property is

user.timezone=timezone

where timezone is the supported value for your time zone. For a list of supported values, see Supported user.timezone property values for the Development Kit for Java(R) 1.3.

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

Set the user.timezone property in several different files. The time zone setting has different effects based on the file in which it is specified.

Configure a locale to specify the time zone

You can also configure your application server to run in a locale. The locale determines the time zone in which a Java virtual machine operates. To use locales, follow these steps:

  1. If Extended NLS Support is not already installed on your iSeries server, install it by selecting option 21 when you install the OS/400 base operating system (5769-SS1).
  2. Run the Create File (CRTF) command to create a locale source physical file from file LOCALSRC in library QSYSLOCALE.
  3. Run the Start SEU (STRSEU) command to edit the source file.
  4. Specify a time zone in the file.
  5. Note: The source file also contains settings to indicate when daylight savings time begins, when it ends, and how much time to add or subtract. The Java virtual machine ignores these settings and reads only the time zone field TNAME. The value of TNAME must match the name of a Java time zone.

  6. Run the Create Locale (CRTLOCALE) command to create a locale from the source file.
  7. Run the Change User Profile (CHGUSRPRF) command to change the user profile under which the application server runs. Edit the user profile to use the new locale.

If you use more than one method to specify the time zone, the application server prioritizes the methods in this order: