Java 1.5 and timezone (89 Views)
Reply
Honored Contributor
Alex Lavrov.
Posts: 1,270
Registered: ‎11-16-2002
Message 1 of 2 (89 Views)

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)
Honored Contributor
Alex Lavrov.
Posts: 1,270
Registered: ‎11-16-2002
Message 2 of 2 (89 Views)

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)
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.