JAVA 时间T Z格式转化为本地时间

SimpleDateFormat df = new SimpleDateFormat(“yyyyMMddHHmmss’Z’”);
SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);
df.setTimeZone(TimeZone.getTimeZone(“UTC”));
String entryTime = (String) createTimestamp;
entryTime = sdf.format(df.parse(entryTime));

JAVA 时间T Z格式转化为本地时间

SimpleDateFormat df = new SimpleDateFormat(“yyyyMMddHHmmss’Z’”);
SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);
df.setTimeZone(TimeZone.getTimeZone(“UTC”));
String entryTime = (String) createTimestamp;
entryTime = sdf.format(df.parse(entryTime));