Java 8 Date and Time API - parse yyyy-MM-dd'T'HH:mm:ss.SSSZ -


i'm trying parse date in iso8601 format:

yyyy-mm-dd't'hh:mm:ss.sssz

am correct not possible parse of default formats defined in java.time.format.datetimeformatter?

for example iso_offset_date_time parse only:

yyyy-mm-dd't'hh:mm:ss.ssszz

samples:

yyyy-mm-dd't'hh:mm:ss.sssz 2015-04-29t10:15:00.500+0000  yyyy-mm-dd't'hh:mm:ss.ssszz 2015-04-29t10:15:00.500+00:00 

btw:i know can define own formatter not issue. wanted ensure i'm not missing isodatetimeformat of joda able parse both:

 org.joda.time.format.datetimeformatter datetimeformatter = isodatetimeformat.datetime();  datetime datetime = datetimeformatter.parsedatetime("2015-04-29t10:15:00.500+0000"); 

you correct in not appear match of default formats, need build format java.time.format.datetimeformatterbuilder.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -