aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/CsvBuilder.java
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/web/CsvBuilder.java
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/web/CsvBuilder.java')
-rw-r--r--src/org/traccar/web/CsvBuilder.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/org/traccar/web/CsvBuilder.java b/src/org/traccar/web/CsvBuilder.java
index 29e2ccfbc..f7455b528 100644
--- a/src/org/traccar/web/CsvBuilder.java
+++ b/src/org/traccar/web/CsvBuilder.java
@@ -19,6 +19,7 @@ package org.traccar.web;
import java.beans.Introspector;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
@@ -28,9 +29,6 @@ import java.util.SortedSet;
import java.util.TreeSet;
import com.fasterxml.jackson.core.JsonProcessingException;
-import org.joda.time.DateTime;
-import org.joda.time.format.DateTimeFormatter;
-import org.joda.time.format.ISODateTimeFormat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.Context;
@@ -41,7 +39,6 @@ public class CsvBuilder {
private static final String LINE_ENDING = "\r\n";
private static final String SEPARATOR = ";";
- private static final DateTimeFormatter DATE_FORMAT = ISODateTimeFormat.dateTime();
private StringBuilder builder = new StringBuilder();
@@ -94,7 +91,7 @@ public class CsvBuilder {
addSeparator();
} else if (method.getReturnType().equals(Date.class)) {
Date value = (Date) method.invoke(object);
- builder.append(DATE_FORMAT.print(new DateTime(value)));
+ builder.append(DateTimeFormatter.ISO_DATE_TIME.format(value.toInstant()));
addSeparator();
} else if (method.getReturnType().equals(Map.class)) {
Map value = (Map) method.invoke(object);
@@ -163,4 +160,5 @@ public class CsvBuilder {
public String build() {
return builder.toString();
}
+
}