title: Spring boot: JSON deserialize date and time with time zone to LocalDateTime
body: <p>I'm using Java 11, Spring Boot 2.2.6.RELEASE. How can I deserialize &quot;2019-10-21T13:00:00+02:00&quot; to LocalDateTime?</p>
  <p>Tried so far:</p>
  <pre><code>  @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @DateTimeFormat(iso = ISO.DATE_TIME)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = &quot;yyyy-MM-dd'T'HH:mm:ssZ&quot;)
    private LocalDateTime startTime;
  </code></pre>
  <p>But I get the following error:</p>
  <pre><code>2021-02-19 07:45:41.402  WARN 801117 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from String &quot;2019-10-21T13:00:00+02:00&quot;: Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParseException) Text '2019-10-21T13:00:00+02:00' could not be parsed, unparsed text found at index 19; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.time.LocalDateTime` from String &quot;2019-10-21T13:00:00+02:00&quot;: Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParseException) Text '2019-10-21T13:00:00+02:00' could not be parsed, unparsed text found at index 19
   at [Source: (PushbackInputStream); line: 2, column: 18] (through reference chain: example.app.dto.DtoRequest[&quot;startTime&quot;])]
  </code></pre>