我收到的日期格式如下:
“最后期限”:“ 2019-07-05T16:30:00”
我正在尝试使用以下格式化程序解析它:
private val formatter: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss", Locale.ENGLISH)
Run Code Online (Sandbox Code Playgroud)
但是我收到以下异常:
org.threeten.bp.format.DateTimeParseException: Text '2019-05-21T12:30:00' could not be parsed at index 19
Run Code Online (Sandbox Code Playgroud)
注意:我正在使用ThreeTenABP库