aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model/Position.java
diff options
context:
space:
mode:
authorLeandro Silva Ferreira <leandrosilvaferreira@gmail.com>2012-08-15 08:58:26 -0400
committerLeandro Silva Ferreira <leandrosilvaferreira@gmail.com>2012-08-15 08:58:26 -0400
commita946618d649cde478d8750bb6b84cb521b68c87c (patch)
tree1d6bf20b088439d71ee54e6beb6bc33e1ca1ad8a /src/org/traccar/model/Position.java
parentf91125ae896c83b9b47fd73a47c2a7af15af77c4 (diff)
downloadtrackermap-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/model/Position.java')
-rw-r--r--src/org/traccar/model/Position.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index b408dbbf2..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;
@@ -151,6 +158,18 @@ public class Position {
public void setPower(Double power) {
this.power = power;
}
+ /**
+ * Mode / 1 - Parking | 2 - Driving
+ */
+ private int mode;
+
+ public int getMode() {
+ return mode;
+ }
+
+ public void setMode(int mode) {
+ this.mode = mode;
+ }
/**
* Address