2019-03-24T07:27:02.070Z

tech2023-07-22  117

public static void main(String[] args) throws ParseException { String expDate = "2019-03-24T07:27:02.070Z"; SimpleDateFormat format1 = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSXXX");// 转换时区格式 SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String time = format2.format(format1.parse(expDate));// 2019-03-24 15:27:02 System.out.println(time); }
最新回复(0)