Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jboss with UTC timezone

We have setup our server timezone (Windows) UTC (coordinated universal time) , but when we start the JBoss I could see -5 hours from system time in the console as well as in the jboss log. For e.g., system is 0900 HRS jboss log and console shows as 0400 HRS.

Please throw some idea where we should configure in jboss to pickup UTC time.

Rgds Balaji

like image 206
Balaji Avatar asked Feb 22 '23 20:02

Balaji


1 Answers

You can always enforce a timezone using a Java system property during startup, this does not apply to JBoss only:

java -Duser.timezone=UTC [...]

or programatically:

System.setProperty("user.timezone", "UTC");

I'm not a JBoss expert, but I guess JBoss provides a way to explicitly set the timezone, e.g. using administration console or configuration script.

like image 145
home Avatar answered Mar 03 '23 04:03

home