I'm trying to convert a string formatted date in UTC to a date object which is resulting a conversion that is off by a couple of minutes.
SimpleDateFormat fullDateFormater = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS", Locale.US);
fullDateFormater.setTimeZone(TimeZone.getTimeZone("UTC"));
Before Parsing the date string is - 2014-07-07T18:24:23.788810
After Parsing the Date is Tue Jul 08 00:07:31 GMT+05:30 2014
The correct date conversion is Tue Jul 07 23:54:23 GMT+05:30 2014
There is a difference of about 12-13 minutes in the conversion. I have observed a difference in the range of 10 minutes in the conversion.
Any idea what is going wrong?
See Question&Answers more detail:os