aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorLeandro Silva Ferreira <leandrosilvaferreira@gmail.com>2012-08-11 20:03:05 -0400
committerLeandro Silva Ferreira <leandrosilvaferreira@gmail.com>2012-08-11 20:03:05 -0400
commit65433706d8c321c1e29844de41576e1b38af8638 (patch)
tree978bb588cd1dc9e57233b74128fa45fd7faf2b90 /src/org
parent85229eebab501ee0b36a2b84c1a2df2124f31571 (diff)
downloadtraccar-server-65433706d8c321c1e29844de41576e1b38af8638.tar.gz
traccar-server-65433706d8c321c1e29844de41576e1b38af8638.tar.bz2
traccar-server-65433706d8c321c1e29844de41576e1b38af8638.zip
Translate the user interface to portuguese
Corrected the date column Added Mode column
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/http/WebServer.java13
-rw-r--r--src/org/traccar/model/Position.java7
2 files changed, 14 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(",");
}
}
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index 0d04f4d49..e6ac46de1 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -15,6 +15,7 @@
*/
package org.traccar.model;
+import java.text.SimpleDateFormat;
import java.util.Date;
/**
@@ -56,6 +57,12 @@ public class Position {
public Date getTime() {
return time;
}
+
+ public String getTimeFormated(){
+ SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
+ df.setLenient(false);
+ return df.format(time);
+ }
public void setTime(Date time) {
this.time = time;