Android how to convert string date format into UTC? -


i need convert string date format utc, have tried convert below, not working correctly dont know mistake 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 me find out issue


Comments