title: How to get OffsetDateTime->LocalDateTime and save this as UTC?
body: <p>I didn't find a suitable answer for my problem even after a lot of searching.
  It's a DateConvertUtil class in a Java API.
  This is kind of a refactoring/feature task.</p>
  
  <p>I have a Method, which parses a given date String, formats it with the help of another Method and returns a LocalDateTime(this kinda has to be - too much dependencies).</p>
  
  <p>I want to get the Timezone of the User, convert(or maybe don't) to LocalDateTime BUT don't want to save the LocalDateTime but the UTC one everytime.</p>
  
  <p>My Problem now is how to approach this.
  I don't seem to get the Offset.</p>
  
  <p>The parser was working before, but only for LocaldateTime, the formatter works too.</p>
  
  <p>So far I have </p>
  
  <pre><code>    public static LocalDateTime parseIso8601(String date) {
          if (date == null || date.isEmpty() || date.trim().equalsIgnoreCase("") || date.length() &lt; 10) throw new
                  IllegalArgumentException("Date cannot by empty or smaller than 10 characters for parsing! Minimum date " +
                  "is yyyy-MM-dd");
  
  
          LocalDateTime localDateTime;
          OffsetDateTime offsetDateTime = OffsetDateTime.now();
          offsetDateTime.toInstant().atZone(ZoneOffset.UTC);
  
          localDateTime = offsetDateTime.toLocalDateTime();
  
          return localDateTime.parse(date, buildIso8601Formatter());
  </code></pre>
  
  <p>So I have read some about ZonedDateTime and Timestamps, but maybe I just can't think straight.</p>
  
  <p>I appreciate any help.</p>