我正在尝试确定要使用的 java 日期格式字符串
"Fri Jun 05 00:00:00 PDT 2015"
现在我正在使用
SimpleDateFormat format = new SimpleDateFormat("EEE MM dd HH:mm:ss zzzz yyyy");
但这会产生
com.fasterxml.jackson.databind.JsonMappingException:
java.text.ParseException: Unparseable date: "Fri Jun 05 00:00:00 PDT 2015"
(through reference chain:....
最佳答案
您当月还需要一个 M
:
EEE MMM dd HH:mm:ss zzzz yyyy
the Javadocs of SimpleDateFormat
中提到了这一点:
Month: If the number of pattern letters is 3 or more, the month is interpreted as text; otherwise, it is interpreted as a number.
关于java - "Fri Jun 05 00:00:00 PDT 2015"的日期格式是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30849981/