aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainEventHandler.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-11-08 13:37:38 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-11-08 13:37:38 +1300
commit9c9370f72c51d7466d3b25a59264ee98f4319b3a (patch)
tree1fca14e8a624e79f86b913dc60f94a93513a8eb0 /src/org/traccar/MainEventHandler.java
parent81d2b86ac7cca874b32c94fffa28b902c6fb0eca (diff)
downloadtrackermap-server-9c9370f72c51d7466d3b25a59264ee98f4319b3a.tar.gz
trackermap-server-9c9370f72c51d7466d3b25a59264ee98f4319b3a.tar.bz2
trackermap-server-9c9370f72c51d7466d3b25a59264ee98f4319b3a.zip
Fix time formatting issues
Diffstat (limited to 'src/org/traccar/MainEventHandler.java')
-rw-r--r--src/org/traccar/MainEventHandler.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java
index 311a41f34..3032646c1 100644
--- a/src/org/traccar/MainEventHandler.java
+++ b/src/org/traccar/MainEventHandler.java
@@ -23,10 +23,10 @@ import io.netty.handler.codec.http.HttpRequestDecoder;
import io.netty.handler.timeout.IdleStateEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.traccar.helper.DateUtil;
import org.traccar.model.Position;
import java.sql.SQLException;
-import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
@@ -61,8 +61,7 @@ public class MainEventHandler extends ChannelInboundHandlerAdapter {
StringBuilder s = new StringBuilder();
s.append(formatChannel(ctx.channel())).append(" ");
s.append("id: ").append(uniqueId);
- s.append(", time: ").append(
- new SimpleDateFormat(Context.DATE_FORMAT).format(position.getFixTime()));
+ s.append(", time: ").append(DateUtil.formatDate(position.getFixTime(), false));
s.append(", lat: ").append(String.format("%.5f", position.getLatitude()));
s.append(", lon: ").append(String.format("%.5f", position.getLongitude()));
if (position.getSpeed() > 0) {