You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" java.lang.IllegalArgumentException: Unknown pattern letter: i
at java.time.format.DateTimeFormatterBuilder.parsePattern(DateTimeFormatterBuilder.java:1672)
at java.time.format.DateTimeFormatterBuilder.appendPattern(DateTimeFormatterBuilder.java:1581)
at java.time.format.DateTimeFormatter.ofPattern(DateTimeFormatter.java:536)
at com.alibaba.fastjson2.reader.FieldReaderDateMethod.getFormatter(FieldReaderDateMethod.java:117)
at com.alibaba.fastjson2.reader.FieldReaderDateMethod.readFieldValue(FieldReaderDateMethod.java:76)
at com.alibaba.fastjson2.reader.ObjectReader1.readObject(ObjectReader1.java:242)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:421)
at com.example.jdbc.UnixTimeTest.main(UnixTimeTest.java:22)
The text was updated successfully, but these errors were encountered:
问题描述
反序列unixtime时间字符串到java.util.Date报错
环境信息
重现步骤
JSON.parseObject
方法Exception in thread "main" java.lang.IllegalArgumentException: Unknown pattern letter: i
错误期待的正确结果
反序列化成功
相关日志输出
Exception in thread "main" java.lang.IllegalArgumentException: Unknown pattern letter: i
at java.time.format.DateTimeFormatterBuilder.parsePattern(DateTimeFormatterBuilder.java:1672)
at java.time.format.DateTimeFormatterBuilder.appendPattern(DateTimeFormatterBuilder.java:1581)
at java.time.format.DateTimeFormatter.ofPattern(DateTimeFormatter.java:536)
at com.alibaba.fastjson2.reader.FieldReaderDateMethod.getFormatter(FieldReaderDateMethod.java:117)
at com.alibaba.fastjson2.reader.FieldReaderDateMethod.readFieldValue(FieldReaderDateMethod.java:76)
at com.alibaba.fastjson2.reader.ObjectReader1.readObject(ObjectReader1.java:242)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:421)
at com.example.jdbc.UnixTimeTest.main(UnixTimeTest.java:22)
The text was updated successfully, but these errors were encountered: