Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jackson - Can't deserialize datetime with timezone offset 'unparsed text found at index 23'

Tags:

My datetime has to come from frontend with timezone offset: 2017-07-04T06:00:00.000+01:00

I cannot deserialize it with Jackson. The error is:

Text '2017-07-04T06:00:00.000+01:00' could not be parsed, unparsed text found at index 23;

I was trying to Google the solution by all are about DateTime with Z at the end.

    @NotNull
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS aZ")
    private LocalDateTime time;

Is there any solution for that?