title: Parse ISO-8601 Datetime
body: <p>It seems the proper form of timestamp to parse ISO-8601 in Java looks like:</p>
  
  <p>"2020-02-03T23:40:17+00:00";</p>
  
  <p>However mine looks like:</p>
  
  <p>"2020-02-03T23:40:17+0000";</p>
  
  <p>How can I parse this properly?</p>
  
  <pre><code>import java.time.OffsetDateTime;
  import java.time.format.DateTimeFormatter;
  
   public class TestTime {
          public static void main(String[] args) {
  
              String ts = "2020-02-03T23:40:17+0000";
              DateTimeFormatter timeFormatter = DateTimeFormatter.ISO_DATE_TIME;
              OffsetDateTime offsetDateTime = OffsetDateTime.parse(ts, timeFormatter);
              long timestamp = offsetDateTime.toEpochSecond() * 1000;
  
          }
      }
  </code></pre>