直接上代码 亲测 有效
dateStr = dateStr.replace("Z", " UTC");System.out.println(dateStr);SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");Date d = format.parse(dateStr);SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//需要转化成的时间格式String str1 = format1.format(d);//看结果: 时区也转换了//2018-08-21 00:00:00
�
