Question & Answer
Question
How to change Java Application Timestamp
Answer
export TZ="Asia/Hong_Kong"
This overrides the environment variable timezone setting.
To change the timezone/timestamp for a specific Java application, start Java application with argument "-Duser.timezone=<timezone ID>"
added to Java command line.
TimeZone.setDefault
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Hong_Kong"));
# tar -xvf CurrentTimezone.tar
2. Change permissions
# chmod 755 setupenv.sh
# chmod 755 ShowTimeZone.java
3. Run the script:
./setupenv.sh <java-home (ex:/usr/java8)>
Date : Thu Jun 25 22:28:17 CDT 2020
Date : Fri Jun 26 11:28:17 HKT 2020
MustGather: Incorrect time stamps displayed by an application or in log files
SUPPORT:
If additional assistance is required after completing all of the instructions provided in this document, please follow the step-by-step instructions below to contact IBM to open a case for software under warranty or with an active and valid support contract. The technical support specialist assigned to your case will confirm that you have completed these steps.
a. Document and/or take screen shots of all symptoms, errors, and/or messages that might have occurred
b. Capture any logs or data relevant to the situation.
c. Contact IBM to open a case:
-For electronic support, please visit the IBM Support Community:
https://www.ibm.com/mysupport
-If you require telephone support, please visit the web page:
https://www.ibm.com/planetwide/
d. Provide a good description of your issue and reference this technote
e. Upload all of the details and data to your case
-You can attach files to your case in the IBM Support Community
-Or Upload data to IBM testcase server analysis:
http://www.ibm.com/support/docview.wss?uid=ibm10733581
f. Click here to submit feedback for this document.
Related Information
Was this topic helpful?
Document Information
Modified date:
28 June 2020
UID
ibm16232448