I want to convert "2005-06-21 03:06:25,EST" to GMT equivalent in the same format (like "2005-06-21 011:06:25,GMT"). Can anybody tell me correct way to implement this?
Is it required for us to know the GMT offset and other considerations like Daylight Savings for convertion ? OR it can be handled automatically in
Java?
I am trying in following way.
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd,hh:mm:ss");
Date firstDate = sdf.parse("2005-06-21 03:06:25");
I am not clear how to proceed..using Calendar/TimeZone or manually add the GMT offset to this date.
One problem is , even if i set the timezone as GMT for calendar, if i do getTime(), it always says IST. why?
Please clarify.
Thanks in advance
Naveen Hegde
Bangalore