aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-17 15:50:19 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-17 15:50:19 +1200
commit7e2ed343d2a6a03938c3f074417464c63d31fd59 (patch)
tree61dd514f7618ac07b56ccfd84f607e3d8b7c4b98 /src/org/traccar/helper
parentda5286acb0c81f5b9bfe92eaa30e9759e3fff6b5 (diff)
downloadtrackermap-server-7e2ed343d2a6a03938c3f074417464c63d31fd59.tar.gz
trackermap-server-7e2ed343d2a6a03938c3f074417464c63d31fd59.tar.bz2
trackermap-server-7e2ed343d2a6a03938c3f074417464c63d31fd59.zip
Remove joda time library
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r--src/org/traccar/helper/DateUtil.java10
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)));
}
+
}