Operating System - HP-UX
1832428 Members
3370 Online
110042 Solutions
New Discussion

Time of day change with Java apps?

 
SOLVED
Go to solution
Jimmy Tom_2
Frequent Advisor

Time of day change with Java apps?

I was told that there is an issue regarding Java applications on the Sun platform correctly adjusting themselves for the transition to and from the new Daylight Savings Time date boundaries. My question is: what, if any, are the time-of-day change issues for Java apps running on HP-UX? Are any patches required?

thx in advance
5 REPLIES 5
Peter Godron
Honored Contributor

Re: Time of day change with Java apps?

Vamsidin
Frequent Advisor

Re: Time of day change with Java apps?

Yes there are..there are DST patches but they do not relate directly to Java, they are for the OS....
Required patche:tztab(4) cumulative patch
Bill Hassell
Honored Contributor
Solution

Re: Time of day change with Java apps?

For HP-UX, there is a specific patch that updates the daylight saving dates starting in 2007. It is a single file /usr/lib/tztab. It may be applied at anytime (no reboot necessary). The patches are:

11.00 = PHCO_27528
11.11 = PHCO_34668
11.23 = PHCO_34669

There is no patch for 10.20 or earlier as pre-11 systems are not supported. However, the 11.00 patch can be un-tar'd and the tztab file used as is.

As for Java, since it runs on so many different platforms (and many have super-lousy timezone handling), Sun chose to handle timezones internally in the engine. Therefore, you'll need to update Java on every platform (in addition to fixing the OS).


Bill Hassell, sysadmin
IT Response
Esteemed Contributor

Re: Time of day change with Java apps?

For java check www.hp.com/go/java. There is a link off the main page in red. Also, before month end there may be a tool available, similar to sun and IBM's that will change Java TZ files without having to install a whole new Java version.
Also check:
8606420800 - YK changes in librwtool and in lib++.a
fix
Applications linked shared can just apply the aC++ Runtime patch.
If linked archive, the application must be relinked.

For librwtool the following patches exist:
[PHSS_33941/PACHRDME/English] 11.00
[PHSS_33942/PACHRDME/English] 11.11
[PHSS_34041/PACHRDME/English] 11.23

lib++.a is only fixed with the A.03.70 release.



8606430960 - DCE and Daylight Saving changes in U.S.


Fix Release : - 11.31
11.11 : - December 2006
11.23 : - December 2006
cheers,
Nick

Antonio Cardoso_1
Trusted Contributor

Re: Time of day change with Java apps?

Hi all,

it seems that date changes of OS are not properly handled by java VM on HP-UX.
I have a HP-UX 11.11 with latest patch updates, and the very basic class show it clearly:
1) Run the class on HP-UX, and change the system date, you'll see the output continuing on the same time base as when started (+10 seconds at each print).
2) Run the same on Windows or Linux, you'll notice th system date change is taken into account by the JVM.

It seems HP-UX JVM is not behaving as on other systems.

------------------------------------
import java.util.*;
import java.text.SimpleDateFormat;
public class TestDateChange
{
public static void main(String[] args) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddHHmmss");
fmt.setTimeZone(TimeZone.getTimeZone("GMT"));
for (int i=0; i < 10; i++) {
String date_ = fmt.format(Calendar.getInstance().getTime());
System.out.println("("+i+") current GMT time is : "+date_);
try {
Thread.sleep(10000);
} catch (Exception e) {}
}
}
}