Operating System - HP-UX
1752579 Members
4350 Online
108788 Solutions
New Discussion

Re: Java 1.5 and timezone

 
Alex Lavrov.
Honored Contributor

Java 1.5 and timezone

Hello,

I installed Java 1.5 on my box and wrote a simple program that displayes the current time and date. The problem is that the time displayed is actually the time I see when I invoke "date -u" and not "date". Same program compiled and run with Java 1.4 (same server) shows the right time (like "date").

I think it has something to do with timezone settings, that for some reason are different for 1.5 and 1.4

Any ideas about it?


Thanx.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
1 REPLY 1
Alex Lavrov.
Honored Contributor

Re: Java 1.5 and timezone

Well, just for protocol I found the problem.
TZ that is set in the system, must appear in /opt/java1.5/jre/lib/tzmappings file in order java will recognize it.

Hope it will help to someone in the future.
I don't give a damn for a man that can only spell a word one way. (M. Twain)