ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzamy_5.4.0.1/50/admin/reftz.htm

75 lines
4.9 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Set the time zone</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h3><a name="reftz"></a>Set the time zone</h3>
<p>To ensure that the application server runtime and your application components have the correct date and time values, set the <strong>user.timezone</strong> property. The syntax of the property is</p>
<pre>user.timezone=<em>timezone</em></pre>
<p>where <em>timezone</em> is the supported value for your time zone. For a list of supported values, see <a href="reftzval.htm">Supported user.timezone property values for the Development Kit for Java(R) 1.3</a>.</p>
<p><strong>Note:</strong> 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.</p>
<p>You can 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.</p>
<ul>
<li><p><strong>Set the property to affect all Java virtual machine processes on your iSeries server.</strong><br>
Edit the user.timezone property in the /QIBM/UserData/Java400/SystemDefault.properties file. If the file does not exist, create it in this directory.</p></li>
<li><p><strong>Set the property to affect application servers.</strong><br>
You have two options:</p>
<ul>
<li>Edit the /home/<em>user_ID</em>/SystemDefault.properties file, where <em>user_id</em> is the user profile under which the application server runs. By default, this is the QEJBSVR user profile. If the file does not exist, create it in this directory. If you specify the time zone in this file, only application server jobs are affected.</li>
<li>In the administrative console, add the user.timezone property to the Java virtual machine system properties for your application server:
<ol>
<li><a href="acstart.htm">Start the administrative console</a>.</li>
<li>In the topology tree, expand <strong>Servers</strong> and click <strong>Application Servers</strong>.</li>
<li>Click the name of the application server for which you want to set the time zone.</li>
<li>On the application server page, click <strong>Process Definition</strong>.</li>
<li>On the <strong>Process Definition</strong> page, click <strong>Java Virtual Machine</strong>.</li>
<li>On the <strong>Java Virtual Machine</strong> page, click <strong>Custom Properties</strong>.</li>
<li>On the <strong>Custom Properties</strong> page, click <strong>New</strong>.</li>
<li>Specify user.timezone in the Name field and <em>timezone</em> in the Value field, where <em>timezone</em> is the supported value for your time zone.</li>
<li>Click <strong>Apply</strong>.</li>
<li><a href="acsave.htm">Save the configuration</a>.</li>
</ol></li>
</ul><p></p></li>
</ul>
<p><strong>Configure a locale to specify the time zone</strong></p>
<p>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:</p>
<ol>
<li>If Extended NLS Support is not already installed on your iSeries server, install it by selecting option 21 when you install the i5/OS base operating system (5769-SS1).</li>
<li>Run the Create File (CRTF) command to create a locale source physical file from file LOCALSRC in library QSYSLOCALE.</li>
<li>Run the Start SEU (STRSEU) command to edit the source file.</li>
<li>Specify a time zone in the file.</li>
<p><strong>Note:</strong> 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.</p>
<li>Run the Create Locale (CRTLOCALE) command to create a locale from the source file.</li>
<li>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.</li>
</ol>
<p>If you use more than one method to specify the time zone, the application server prioritizes the methods in this order:</p>
<ul>
<li>Java virtual machine system property</li>
<li>User directory SystemDefault.properties file</li>
<li>java400<sup>(TM)</sup> SystemDefault.properties file</li>
<li>Locale</li>
</ul>
</body>
</html>