Go to http://java.sun.com/ and look on the right side of the page where it says: "Alert US Time Zone Changes ...". That will tell you what you need to know and do.
Joined: Aug 24, 2006
Ok,... I have installed tzupdater.jar file in my system and then looked at C:\Program Files\Java\ and it has shown 2 jre instances..
I have executed the java -jar tzupdater.jar -u on both the instances and then run a java program using those 2 jre's and the new Date() gives the correct value That's good...
Then i open my IBM Rational App Developer(RAD) and run the same program,... and DAMN !!! it still shows 1 hour behind... I mean then i tried to run the same java -jar tzupdater.jar -u at the C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin and it throws an error The Java runtime doesn''t have time zone data (zi directory).
damn... then i searched for zi in my system and there are only 2 places,... C:\Program Files\Java\j2re1.4.2_03\lib\zi and C:\Program Files\Java\j2re1.4.2_04\lib\zi in which place i have anyway upgraded the JRE... So where is the IBM RAD getting the "zi" from ?? and it sure is using the other jre which i have not upgraded...
I really appreciate your comments on this Thanks a lot
Ah, well, the patch from Sun only works with Sun JRE's. The JRE that runs the embedded Websphere server in RAD is an IBM JRE. So to update that you will need to get... the IBM Time Zone Update Utility for Java! [ March 12, 2007: Message edited by: Paul Clapham ]
Hi folks, I am using jdk 1.4.2_08. I downloaded the Timezone Updater 1.2.1 and installed it and I am trying to get the GMT shift for a Calendar object so that I can subtract the right time in milliseconds from the Calendar object as I have to send a object with the Timestamp as a parameter to a Webservice which expects Time in GMT. The DST shifting happens on the following day at 00:00:00 instead of the specified day at 02:00:00. Here is what I am trying to do: endTimestamp.set(2008, 10, 2, 23, 59, 59);
endTimestamp.getTime() before set:Sun Nov 02 23:59:59 PST 2008 endTimestamp.getTime().getTimezoneOffset() before set:480 one of my methods returns the offset. GmtOffInMillis:-25200000 GmtOffInhours:-7 endTimestamp.getTime() after set:Sun Nov 02 23:59:59 PST 2008 endTimestamp.getTime() after clear & set:Sun Nov 02 16:59:59 PST 2008 --------------------- endTimestamp.set(2008, 10, 3, 0, 0, 0);
endTimestamp.getTime() before set:Mon Nov 03 00:00:00 PST 2008 endTimestamp.getTime().getTimezoneOffset() before set:480 GmtOffInMillis:-28800000 GmtOffInhours:-8 endTimestamp.getTime() after set:Mon Nov 03 00:00:00 PST 2008 endTimestamp.getTime() after clear & set:Sun Nov 02 16:00:00 PST 2008
As you can see, the shifting should have happened at 2:00 AM on Nov-02-2008, but it actually happens on Nov-03-2008 at 00:00:00.