字段映射成String类型

直接给前端时界面显示如下格式的时间

解决方法: 用SimpleDateFormat将该格式字符串转为时间,再转成想要的格式的字符串。
public static String parseEnglishDate(String dateStr) {
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM d HH:mm:ss 'CST' yyyy", Locale.ENGLISH);
Date temp = null;
try {
temp = dateFormat.parse(dateStr);
} catch (ParseException e) {
e.printStackTrace();
}
return getTimeString(YYYY_MM_DD_HH_MM, temp);
}
GMT: 格林威治时间 UTC:标准时间 ISO: 标准时间 CST:北京时间 时间加Z:代表标准时间(一般和UTC时间一致)