From 0bbf8f554638cdc89d5dd618c500839554602dee Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 24 Nov 2016 10:45:44 +0500 Subject: - Use one parser - Reverted passing variables way --- src/org/traccar/helper/DateUtil.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/org/traccar/helper') diff --git a/src/org/traccar/helper/DateUtil.java b/src/org/traccar/helper/DateUtil.java index 840f37a7a..de36d4420 100644 --- a/src/org/traccar/helper/DateUtil.java +++ b/src/org/traccar/helper/DateUtil.java @@ -24,8 +24,7 @@ import org.joda.time.format.ISODateTimeFormat; public final class DateUtil { - private static final DateTimeFormatter DATE_FORMAT = ISODateTimeFormat.dateTime(); - private static final DateTimeFormatter DATE_FORMAT_NOMILLIS = ISODateTimeFormat.dateTimeNoMillis(); + private static final DateTimeFormatter DATE_FORMAT = ISODateTimeFormat.dateTimeParser(); private DateUtil() { } @@ -67,7 +66,7 @@ public final class DateUtil { } public static DateTime parseDateTime(String value) { - return DATE_FORMAT_NOMILLIS.withOffsetParsed().parseDateTime(value); + return DATE_FORMAT.withOffsetParsed().parseDateTime(value); } } -- cgit v1.2.3