/**
* 将国际时间格式:yyyy-MM-dd'T'HH:mm:ss.S'Z' 格式化 为北京时间(时:分)
*
* @param raw
* @return
*/
private String formatTime(String raw) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.S'Z'");
Date dateTime = null;
try {
dateTime = sdf1.parse(raw);
} catch (ParseException e) {
throw new RuntimeException(e);
}
SimpleDateFormat sdf2 = new SimpleDateFormat("H:mm");
String format = sdf2.format(dateTime);
//将时间改为东八区时间,即将小时数+8
String[] split = format.split(":");
int hour = (Integer.parseInt(split[0]) + 8) % 24;
String time =hour/10>0?hour+":"+split[1]:"0"+hour+":"+split[1];
return time;
}