Reputation: 1139
I have a windows server 2003 machine, installed on it, a cisco product called "Cisco Voice Portal", this product runs on JRE version 1_5_0_12. Getting the date/time either by:
new Date();
or
Calendar.getInstance();
always the date is one hour ahead of the system date. At first, i thought it is a timezone mismatch, however this is the output of printing the date object:
Fri Oct 08 02:36:38 EST 2010
and the system clock is also in EST timezone. which means that timezones are the same. The system date is the correct one, the system machine is is Sydney, Australia. Any suggestions to fix this? Thanks in advance.
Upvotes: 1
Views: 3300
Reputation: 8511
First of all, the JRE has it's own database of timezone information and it may or may not differ from the one on your native platform.
Another problem that you might have is that when launching a JRE, you may have specified either a locale or a timezone that is different than that of your host platform, which will also cause this type of behavior.
PS: You might want to read this FAQ entry from Oracle (ex. Sun) on how platform and JVM timezones are (not) related.
Upvotes: 2
Reputation: 152
Did you try upgrading to newer JRE version? Refer to bug 6595137, which seems to be fixed in 1.5.0_13.
Upvotes: 1