Michael O'Keeffe
Michael O'Keeffe
Not exactly what you are looking for maybe, but worth mentioning from one of the links above is the [appendInstant(int fractionalDigits)](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatterBuilder.html#appendInstant--) in `DateTimeFormatterBuilder`.
Yes, and the comment could be improved too. A little ambiguous though perhaps trying to explain why `ISO_OFFSET_DATE_TIME` is used and not `ISO_ZONED_DATE_TIME`.
I think this is a valid error message, the MAX year is 999999999 per [Oracle documentation](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html): > The maximum supported LocalDateTime, '+999999999-12-31T23:59:59.999999999'. `Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParseException) Text '01.01.+1000000000 00:00:00'...
Thanks for the test case. Taking a 2nd look, it seems I missed a test scenario when previously looking at this. There is some date coercion in certain cases so...
> Passing _any year_ BC leads to weird behavior [emphasis added] Good find, but figuring that would be a different but related issue? I'm not able to reproduce the issue...
Yes, I think it's worth documenting, and answer's the OP's question: > What string formats will deserialise successfully to an Instant type, using a vanilla object mapper? > [snip] my...
I'd be interested in more about the particular use case for this, but setting that aside for the moment, I could _possibly_ see one benefit, of a small performance gain,...
Thanks, though from a quick look at the code, looks like this should work. Therefore adding the 'test-needed', can be added to the "failing" package for now. Perhaps there's a...
Ok, I think I see the issue now.. an int-like String isn't supported, since the code directly uses the `Duration.parse` method, and the [parse ](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#parse-java.lang.CharSequence-)method uses a special format: `Obtains...
Speaking of StackOverflow, would GedMarc's idea work: https://github.com/FasterXML/jackson-modules-java8/issues/71#issuecomment-528000342 (which references setting the precision in the formatter: https://stackoverflow.com/questions/44373144/java-8-how-to-create-datetimeformatter-with-milli-micro-or-nano-seconds)