2020-01-15T18:08:52.6516828+08:00

Java端 

DateFormat tFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
Date date = tFormat.parse(GMTTime);
SimpleDateFormat ukFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy", Locale.UK);
Date ukDate = ukFormat.parse(date.toString());
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateTime = format.format(ukDate);

真坑,互相抄还抄不对,真是浪费时间

找到这个能用,mark

原文地址忘记了

发布了73 篇原创文章 · 获赞 44 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/qq_34928194/article/details/103992761
今日推荐