diff options
author | Leandro Silva Ferreira <leandrosilvaferreira@gmail.com> | 2012-08-15 08:58:26 -0400 |
---|---|---|
committer | Leandro Silva Ferreira <leandrosilvaferreira@gmail.com> | 2012-08-15 08:58:26 -0400 |
commit | a946618d649cde478d8750bb6b84cb521b68c87c (patch) | |
tree | 1d6bf20b088439d71ee54e6beb6bc33e1ca1ad8a /src/org/traccar/http/WebServer.java | |
parent | f91125ae896c83b9b47fd73a47c2a7af15af77c4 (diff) | |
download | trackermap-server-a946618d649cde478d8750bb6b84cb521b68c87c.tar.gz trackermap-server-a946618d649cde478d8750bb6b84cb521b68c87c.tar.bz2 trackermap-server-a946618d649cde478d8750bb6b84cb521b68c87c.zip |
Corrections of wrong "git fetch upstream"
Diffstat (limited to 'src/org/traccar/http/WebServer.java')
-rw-r--r-- | src/org/traccar/http/WebServer.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/org/traccar/http/WebServer.java b/src/org/traccar/http/WebServer.java index 6c79e6421..e379a0a9a 100644 --- a/src/org/traccar/http/WebServer.java +++ b/src/org/traccar/http/WebServer.java @@ -146,14 +146,15 @@ public class WebServer { Iterator<Position> i = dataManager.getPositions(Long.valueOf(deviceId)).iterator(); while (i.hasNext()) { Position position = i.next(); - out.format("{'device_id':%d,'time':'%tF %tT','valid':%b,'latitude':%f,'longitude':%f,'speed':%f,'course':%f}", + out.format("{'device_id':%d,'time':'%s','valid':%b,'latitude':%s,'longitude':%s,'speed':%s,'course':%s,'mode':%d}", position.getDeviceId(), - position.getTime(), position.getTime(), + position.getTimeFormated(), position.getValid(), - position.getLatitude(), - position.getLongitude(), - position.getSpeed(), - position.getCourse()); + position.getLatitude().toString(), + position.getLongitude().toString(), + position.getSpeed().toString(), + position.getCourse().toString(), + position.getMode()); if (i.hasNext()) out.print(","); } } |