title: Java Date and Time remove time zone from given date " 2019-12-03T10:00:00-06:00 " and expected date is "2019-12-03T10:00:00"
body: <pre><code>LocalDateTime formatOrderEndDateTime;
      try {
          DateTimeFormatter formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
          formatOrderEndDateTime = LocalDateTime.parse("2019-12-03T10:00:01+01:00", formatter);
          System.out.println(formatOrderEndDateTime);
      } catch (Exception e) {
          throw new IllegalArgumentException();
      }
  </code></pre>
  
  <p>Above code is working as expected but its not working if time zone is not available . </p>
  
  <p>given input date :  2019-12-03T10:00:00-06:00 or 2019-12-03T10:00:00</p>
  
  <p>expected o/p date:  2019-12-03T10:00:00 </p>
  
  <p>my code should work for both with time zone and without time zone input dates</p>