SimpleDateFormat “Unparseable date” Exception

后端 未结 8 1777
再見小時候
再見小時候 2020-12-20 16:55

I am trying to parse datetime string with SimpleDateFormat.parse() but I keep receiving Unparseable date exceptions.

Here is the date format I am trying

8条回答
  •  情歌与酒
    2020-12-20 17:45

    The timezone should be GMT-08:00 or -0800 (as Madcore Tom said). See Java docs.

    In Java 7 you can use "yyyy-MM-dd'T'HH:mm:ssX"

提交回复
热议问题