很实用的一个转换函数,留着以便以后使用
// 转换日期格式public String timeFormat(String time){String temp = time.replace("Z", " UTC");SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");Date date = null;try {date = sdf.parse(temp);} catch (ParseException e) {e.printStackTrace();}SimpleDateFormat newDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");String finalDate = newDate.format(date);return finalDate;}