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));

发布了48 篇原创文章 · 获赞 15 · 访问量 1370

猜你喜欢

转载自blog.csdn.net/Bzbtyhydcxy/article/details/103437662