Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
cancel
Showing results for 
Search instead for 
Did you mean: 

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
Highlighted
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)