title: Convert a string to ZonedDateTime
body: <p>I need to convert the string 2020-04-15T23:00:00+0000 to a ZonedDateTime. I tried the below but they didnt work:</p>
  
  <pre><code>DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss Z");
  System.out.println(ZonedDateTime.parse("2020-04-15T23:00:00+0000", formatter));
  
  DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss 00:00");
  System.out.println(ZonedDateTime.parse("2020-04-15T23:00:00+0000", formatter));
  
  DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss 0000");
  System.out.println(ZonedDateTime.parse("2020-04-15T23:00:00+0000", formatter));
  </code></pre>
  
  <p>I used the ISO_LOCAL_DATE_TIME as well but that didnt work. Any ideas?</p>
  
  <p>Update:</p>
  
  <p>I tried below :</p>
  
  <pre><code>    OffsetDateTime dateTime1 = OffsetDateTime.parse("2020-04-15T23:00:00+0000",
              DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ"));
      System.out.println(dateTime1.toZonedDateTime());
  </code></pre>
  
  <p>I get output as 2020-04-15T23:00Z but I need it as 2020-04-15T23:00:00Z with the seconds at the end which this is trimming.</p>