Operating System - HP-UX
1748150 Members
3517 Online
108758 Solutions
New Discussion

$TZ parameter change in HP-UX

 
Snehil123
Occasional Visitor

$TZ parameter change in HP-UX

Hello,

 

I have an issue where the JRE is picking up incorrect timezone string id of GMT+04:00 format from the OS instead of something like "Asia/Dubai". The OS version  being used is:

HP-UX  B.11.31 U ia64 2972939761 unlimited-user license

(I have attached output of 'uname -all' and 'swlist -l bundle' for detailed OS info

 

One of things we noticed was that the $TZ variable was set to something which  was not set to a valid value form the tztab or the tzmappings file, so we changed it to something which exists in those 2 files, but JRE is still not picking up the change.

 

Do we have to reboot the nodes for JRE to pick up the changes?

 

Please advise,

 

Thanks!

 

 

P.S. This thread has been moved from HP-UX > System Administration to HP-UX > languages. - Hp forum Moderator

 

5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: $TZ parameter change in HP-UX

>was that the $TZ variable was set to something which  was not set to a valid value

 

What is the value of TZ?

 

>something like "Asia/Dubai". 

 

The OS knows nothing about these newfangled Java/Linux timezones.  It's all done by java.

Snehil123
Occasional Visitor

Re: $TZ parameter change in HP-UX

Currently, the $TZ is set to the following:

root:cert@amcnpap1:/> echo $TZ

WST-4WSTDST

 

But Java is recognizing GMT+04:00

 

Please advise,

 

Thanks!

RJHall
Frequent Advisor

Re: $TZ parameter change in HP-UX

Perhaps you need to use 'tzupdater'?

Dennis Handly
Acclaimed Contributor

Re: $TZ parameter change in HP-UX

>WST-4WSTDST   But Java is recognizing GMT+04:00

 

This is correct if Java has no idea what "WST" means or the whole string.

tztab(4) has a comment that says:

# European Russia (samara) Time, European Russia (samara) Daylight Savings Time

Eric Antunes
Honored Contributor

Re: $TZ parameter change in HP-UX

Hi,

 

Is root running Java or is it being run from another user?

Each and every day is a good day to learn.