diff options
Diffstat (limited to 'src/org/traccar/helper/DateUtil.java')
-rw-r--r-- | src/org/traccar/helper/DateUtil.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/org/traccar/helper/DateUtil.java b/src/org/traccar/helper/DateUtil.java index 30bb1b2fa..458c74609 100644 --- a/src/org/traccar/helper/DateUtil.java +++ b/src/org/traccar/helper/DateUtil.java @@ -15,16 +15,13 @@ */ package org.traccar.helper; +import java.time.Instant; +import java.time.format.DateTimeFormatter; import java.util.Calendar; import java.util.Date; -import org.joda.time.format.DateTimeFormatter; -import org.joda.time.format.ISODateTimeFormat; - public final class DateUtil { - private static final DateTimeFormatter DATE_FORMAT = ISODateTimeFormat.dateTimeParser(); - private DateUtil() { } @@ -61,6 +58,7 @@ public final class DateUtil { } public static Date parseDate(String value) { - return DATE_FORMAT.parseDateTime(value).toDate(); + return Date.from(Instant.from(DateTimeFormatter.ISO_DATE_TIME.parse(value))); } + } |