aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/WebServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/http/WebServer.java')
-rw-r--r--src/org/traccar/http/WebServer.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/org/traccar/http/WebServer.java b/src/org/traccar/http/WebServer.java
index 853bff3de..5dfeabed2 100644
--- a/src/org/traccar/http/WebServer.java
+++ b/src/org/traccar/http/WebServer.java
@@ -147,16 +147,14 @@ 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':'%s','valid':%b,'latitude':%s,'longitude':%s,'speed':%s,'course':%s,'mode':%d,'address':'%s'}",
+ out.format("{'device_id':%d,'time':'%tF %tT','valid':%b,'latitude':%f,'longitude':%f,'speed':%f,'course':%f}",
position.getDeviceId(),
- position.getTimeFormated(),
+ position.getTime(), position.getTime(),
position.getValid(),
- position.getLatitude().toString(),
- position.getLongitude().toString(),
- position.getSpeed().toString(),
- position.getCourse().toString(),
- position.getMode(),
- position.getAddress());
+ position.getLatitude(),
+ position.getLongitude(),
+ position.getSpeed(),
+ position.getCourse());
if (i.hasNext()) out.print(",");
}
}