Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Date / Time zone issue / UTC to BST conversion problem

807603Feb 14 2008 — edited Feb 15 2008
Hello,
I have few dates stored in UTC and i have to retrieve those dates based on my client time zone.

I have tried
Calendar gmtDate = GregorianCalendar.getInstance();
gmtDate.setTimeZone(TimeZone.getTimeZone("Europe\London"));
gmtDate.set(retrievedDates); //  01-07-2008 11:00 hrs 01-02-2008 11:00 hrs UTC (March and Aug)
or
 
Sat Mar 01 02:10:24 GMT 2008
Fri Aug 01 02:10:24 BST 2008
The result of both dates are showing in BST and GMT , but there is no offset time chage .i.e, British Sumer Time force to start on March (GMT +1 ) and finishing on October.

The above results are wrong eventhough they have displayed correct TZ format.

Please let me know how to resolve this issue ?

Thanks and Regards
pv

Java dates are not calculating the times based on the month specified . Both da
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 14 2008
Added on Feb 14 2008
2 comments
1,951 views