This content has been marked as final. Show 5 replies
Java will display the time set on your system.
I am guessing Ubuntu is not set to use "Automatic Daylight Savings Adjustments" or not set with appropriate "Time Zone".
Best solution for this would be to setup a NTP server on one of your boxes in your network, and configure rest of machines to
use this NTP server.
So you may want to look in to configuring NTP server and Client.
Thanks for the response. I should have mentioned that I have verified the local system time zone setting and that the local system time is displayed correctly on the clock. I have also tried updating the time zone using the TZupdater tool, but to no avail.
When java starts on a unix box it uses a rather complicated process to determine what the correct timezone is. Windows is a bit simpler although not trivial.
Whatever that process is it isn't succeeding on your box.
There is either formal or informal documentation on that process somewhere. But I don't know where.
You could also figure it out by looking at the source code.
I don't have Ubuntu. But if you are running the latest version it should have new Tzdata files as per new DayLightSavings time.
And if I remember correctly the new DayLightSavings is adopted in 1.5 itself. So I am positive the 1.6 will also have it.
You can check if Linux is set with correct DayLightSavings by running following command. Make sure YOu see Mar 9 and Nov 2
$ /usr/sbin/zdump -v /etc/localtime | grep 2008
Yes, I already did the zdump as well and I see the correct dates (3/9 and 11/2 for 2008). It seems the Xubuntu system has the right settings as the time is displayed correctly in the system clock, it's the Java Date part that seems to be getting it wrong.