src/main/java/de/dennisguse/opentracks/util/StringUtils.java
public static OffsetDateTime parseTime(String xmlDateTime) {
        try {
            TemporalAccessor t = DateTimeFormatter.ISO_DATE_TIME.parseBest(xmlDateTime, ZonedDateTime::from, LocalDateTime::from);
            if (t instanceof LocalDateTime) {
                Log.w(TAG, "Date does not contain timezone information: using UTC.");
                t = ((LocalDateTime) t).atZone(ZoneOffset.UTC);
            }
            return OffsetDateTime.from(t);
        } catch (Exception e) {
            Log.e(TAG, "Invalid XML dateTime value");
            throw e;
        }
    }
/**
     * Gets the time, in milliseconds, from an XML date time string (ISO8601) as defined at http://www.w3.org/TR/xmlschema-2/#dateTime
     * Let's be lenient: if timezone information is not provided, UTC will be used.
     *
     * @param xmlDateTime the XML date time string
     */


@param xmlDateTime the XML date time string
@param xmlDateTime the XML date time string
public static OffsetDateTime parseTime(String xmlDateTime) {
        try {
            TemporalAccessor t = DateTimeFormatter.ISO_DATE_TIME.parseBest(xmlDateTime, ZonedDateTime::from, LocalDateTime::from);
            if (t instanceof LocalDateTime) {
                Log.w(TAG, "Date does not contain timezone information: using UTC.");
                t = ((LocalDateTime) t).atZone(ZoneOffset.UTC);
            }
            return OffsetDateTime.from(t);
        } catch (Exception e) {
            Log.e(TAG, "Invalid XML dateTime value");
            throw e;
        }
    }
public static OffsetDateTime parseTime ( String xmlDateTime ) { try { TemporalAccessor t = DateTimeFormatter . ISO_DATE_TIME . parseBest ( xmlDateTime , ZonedDateTime :: from , LocalDateTime :: from ) ; if ( t instanceof LocalDateTime ) { Log . w ( TAG , "Date does not contain timezone information: using UTC." ) ; t = ( ( LocalDateTime ) t ) . atZone ( ZoneOffset . UTC ) ; } return OffsetDateTime . from ( t ) ; } catch ( Exception e ) { Log . e ( TAG , "Invalid XML dateTime value" ) ; throw e ; } }
Gets the time, in milliseconds, from an XML date time string (ISO8601) as defined at http://www.w3.org/TR/xmlschema-2/#dateTime
 Let's be lenient: if timezone information is not provided, UTC will be used.
Gets the time in milliseconds from an XML date time string ( ISO8601 ) as defined at http : // www . w3 . org / TR / xmlschema - 2 / #dateTime Let ' s be lenient : if timezone information is not provided UTC will be used .