1. ISO Date 中 CST类型的Date String to Date Instance
package com.x.project.Util; import org.junit.Test; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class DateTest { @Test public void CSTDateParse() throws ParseException { String dateStr = "2018-08-10T07:13:41.525+0000"; DateFormat smfCST = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss.SSSZ"); Date parse = smfCST.parse(dateStr); System.out.println(parse); } }
output:Fri Aug 10 15:13:41 CST 2018