title: Spring JSON converter converting date format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" to OffsetDateTime without offset
body: <p>I been receiving date in the "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" format from JSON input, which gets converted to a DTO by Spring it self. But when converted to <code>OffsetDateTime</code> instance, this loses the information about Offset in the created OffsetDateTime instance. For example we are passing following in the Postman invoking an API, this results in the parsing and object getting created but the object doesn't have offset set in it. </p>
  
  <p>Below is the example of the <code>"2019-03-21T06:43:56.235+11:00"</code> date when parsed it results in the date with OffsetDateTime instance but it doesn't have the <code>+11:00</code> as the offset. When I directly parse this string using <code>DateTimeFormatter</code> I am able to get the offset populated. </p>
  
  <p>below is the code that uses <code>DateTimeFormatter</code>. </p>
  
  <pre><code>OffsetDateTime.parse(offSetDateTimeString, DateTimeFormatter.ofPattern(DATE_PATTERN))
  </code></pre>
  
  <p>The <code>DATE_PATTER = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"</code>. </p>
  
  <p>Please guide. </p>
  
  <p>Thank you.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>My DO has following objects:</p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private int id;
  
  private String name;
  
  // THis won't work as it doesn't support timestamp.
  // @Column(columnDefinition = "TIMESTAMP WITH TIME ZONE")
  // private LocalDateTime localDateTime;
  
  @Column(columnDefinition = "TIMESTAMP WITH TIME ZONE")
  private ZonedDateTime zonedDateTime;
  
  @Column(columnDefinition = "TIMESTAMP WITH TIME ZONE")
  private OffsetDateTime offSetDateTime;
  </code></pre>
  
  <p>While DTO also has same fields with SAME data types.</p>