I need to convert string date format into utc, I have tried to convert as like below, but its not working correctly dont know what mistake i have done
String str_date = "03-06-2015 00:00:00";
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
df.setTimeZone(TimeZone.getTimeZone("UTC"));
Date date;
try {
date = df.parse(dateStr);
stratingdate = df.format(date);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
LogUtil.d("starting date" + stratingdate);
so please help me to find out the issue