1753716 Members
4530 Online
108799 Solutions
New Discussion юеВ

Re: Timezone JVM issue

 
tkaz
New Member

Timezone JVM issue

Hello,

One of my customers observed a strange issue with time zone settings. A java application seems to get incorrect timezone from time to time. The timezone configured at customer's machine is EAT-8 but sometimes after the application is restarted the time used by it is shifted 12 or 13 hours back (EST/EDT?). As an example on one day the date observed in application logs was

Jan 27 16:47:49 (before restart)
Jan 27 03:49:58 (after restart)

According to the info from customer neither the machine was rebooted nor any change of configuration made between two runs of the application and date command always shows correct time zone. Is it possible that HP-UX/JVM falls back to another timezone even if no configuration changes were made? I also found out that setting the TZ value explicitly in a shell script used to start the application seems to fix the problem (although I'm not sure about it).
Any help would be appreciated.
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: Timezone JVM issue

Shalom,

In defiance of good systems practice. Java has its own method of setting and maintaining time zones. It does not use the TZ variable on the systemm.

Java has its own system for setting time zone and its done via a configuration file.

http://www.hp.com/go/java

There is detail on this issue on that site.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
tkaz
New Member

Re: Timezone JVM issue

Sorry for posting lame question but which exactly configuration file should I check? I'm not very familiar with HP-UX and - unfortunately - I have to get answer quickly.