Time 1 hour off: Modify the CA Service Catalog, JRE instances time zone information.

Document ID : KB000004550
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

The tz value for a user in SC has been set as GMT+3(Moscow).

 

However, when opening a new request, the time shows a GMT+4 value in stead.

Environment:
Windows running CA Service Catalog R14.1.The Daylight Saving Time(DST) has been 'removed' from the environment CA Service Catalog(SC) is running on.
Cause:

From within the CA Service Catalog code, there is nothing that is causing this issue.

The time zone information in JRE (shipped with catalog: USM_HOME/embedded/jre7) needs to be updated. 

To get the new time zone effective and the correct time to be set&shown.

 

 

Resolution:

The solution:

==================================

Oracle provides this tool "TimeZone Updater" with which we can do the update of time zone.

Please refer to below link to get the information on how to update the time zone information in JRE.

http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html

On the 'Download' page, scroll down to 'Additional resources' section.

And look for 'Java Time Zone Updater Tool' to then download it from there: Java SE Timezone Updater 2.1.0

You must accept the Java SE Timezone Updater License Agreement to download this software.

From 'Accept License Agreement | Decline License Agreement'

Select the Accept-radiobutton and click on the .zip to start the download.

Product / File Description File Size Download > TZUpdater 0.13 MB tzupdater-2_1_0.zip

 

The tzupdater usage reads:

==================================

The TZUpdater tool modifies the JDK/JRE software instance that is used to execute the tool.

- A single image of the JDK/JRE software is modified per execution. To administer the tool to multiple instances of the JDK/JRE software, see the section System wide Usage.

- You must stop any running instances of the JDK/JRE software to be operated upon before you run the TZUpdater tool on that installed JDK/JRE software image.

- Run the TZUpdater tool with the following command: java -jar tzupdater.jar options

- To update timezone data successfully, you should ensure that you have sufficient privileges to modify the JDK_HOME/jre/lib or JRE_HOME/lib directory.

- If you do not have sufficient privileges to modify these directories, contact your system administrator.

- Options: If you do not specify any options, the usage message is displayed. To update the timezone data, use either the -l or the -f option.

 

The preparation for the tzupdater:

=====================================

1. Download http://www.iana.org/time-zones/repository/tzdata-latest.tar.gz file into e.g. c:\temp

To be able to use the .gz file during the 'java -jar' command, a corresponding 'sha512-hashfile' must exist.

A way to create this 'sha512-hashfile' is the following:

2a. In folder c:\temp, create a new file with name: tzdata-latest.tar.gz.sha512.

2b. Enter a simple value (like e.g. 1) in the file and save it.

3. copy the 'tz'-named files from c:\temp folder into %USM_HOME%\embedded\jre7\bin folder

 

The implementation/execution of the tzupdater:

================================================

4. As explained in the 'usage' of the tzupdater:

- A single image of the JDK/JRE software is modified per execution. To administer the tool to multiple instances of the JDK/JRE software, see the section System wide Usage.

- You must stop any running instances of the JDK/JRE software to be operated upon before you run the TZUpdater tool on that installed JDK/JRE software image.

And to accommodate these rules, you must:

5a. Stop CA Accounting and CA Catalog services

5b. Check task manager for java processes running > none should/can be running

5c. Run the tzupdater from within a commandprompt:

- cd %USM_HOME%\embedded\jre7\bin

- java -jar tzupdater.jar -l file:tzdata-latest.tar.gz -f

 

The below error is to be expected:

> Using file:tzdata-latest.tar.gz as source for tzdata bundle.

> Error. SHA-512 hash for downloaded bundle does not match expected SHA-512 hash.

> Expected   : <your value entered in the file from step 2b>

> Calculated : <the real/actual hash value>

(e.g. 801059f43c91798cf69fb2ae77c1ffab8d06987325081511d573febde19ae423e7432c2b65c7c256077bbdb1b359e010302955786e18f2697bb263c4e0f1cc91)

And to then resolve this:

6. Change HashValue in the .sha512 file:

6a. Open (notepad) tzdata-latest.tar.gz.sha512

6b. Clear the file content

6c. Copy&paste the value from the above 'Calculated' result

6d. Save&close the file

 

7. Rerun the tzupdater:

java -jar tzupdater.jar -l file:tzdata-latest.tar.gz -f

 

8. (re)Start ca service catalog services 

9. Login to the SC-UI, open a new request and confirm the correct time (GMT+3) being shown.

 

Additional Information:

Should you need to 'reset' other JAVA instances you can find their 'folder' to be updated in the following way.

1. Open the Task Manager

2. In the processes list, look for 'java.exe'

3. Right-click and select 'Open File Location'

4. Then use this folder in the 'cd' command in the above step 5c