java.text.ParseException: Unparseable date “yyyy-MM-dd'T'HH:mm:ss.SSSZ” - SimpleDateFormat

后端 未结 2 871
自闭症患者
自闭症患者 2020-12-15 02:51

I would appreciate any help with finding bug for this exception:

java.text.ParseException: Unparseable date: \"2007-09-25T15:40:51.0000000Z\"
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-15 03:44

    Z represents the timezone character. It needs to be quoted:

    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
    

提交回复
热议问题