My program converts UTC time to localtime but not in the format that I want. I took an example from the following link Convert UTC to current locale time
public static void main(String[] args) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
Date myDate = simpleDateFormat.parse("2015-08-19 05:30:00.049 UTC+0000");
System.out.println("**********myDate:" + myDate);
}
Output:
**********myDate:Wed Aug 19 01:30:00 EDT 2015
My expected output format is:
2015-08-19 01:00:14
Please advise.