aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/GpxBuilder.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/GpxBuilder.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/GpxBuilder.java')
-rw-r--r--src/org/traccar/web/GpxBuilder.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/org/traccar/web/GpxBuilder.java b/src/org/traccar/web/GpxBuilder.java
index bac7182dc..a4daf154e 100644
--- a/src/org/traccar/web/GpxBuilder.java
+++ b/src/org/traccar/web/GpxBuilder.java
@@ -16,11 +16,8 @@
*/
package org.traccar.web;
+import java.time.format.DateTimeFormatter;
import java.util.Collection;
-
-import org.joda.time.DateTime;
-import org.joda.time.format.DateTimeFormatter;
-import org.joda.time.format.ISODateTimeFormat;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;
@@ -41,8 +38,6 @@ public class GpxBuilder {
+ "</trkpt>%n";
private static final String FOOTER = "</trkseg></trk></gpx>";
- private static final DateTimeFormatter DATE_FORMAT = ISODateTimeFormat.dateTime();
-
public GpxBuilder() {
builder.append(HEADER);
builder.append("<trkseg>\n");
@@ -55,7 +50,7 @@ public class GpxBuilder {
public void addPosition(Position position) {
builder.append(String.format(POINT, position.getLatitude(), position.getLongitude(),
- DATE_FORMAT.print(new DateTime(position.getFixTime())), position.getAltitude(),
+ DateTimeFormatter.ISO_DATE_TIME.format(position.getFixTime().toInstant()), position.getAltitude(),
position.getCourse(), UnitsConverter.mpsFromKnots(position.getSpeed())));
}