aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-04-27 12:01:43 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-04-27 12:01:43 +1200
commitd560f0cfdbbe9639e681bfeedd25d4de845d6161 (patch)
tree3845758ede6bafb9ee8d5fc2bda37de446ae9f34 /src/org/traccar/database
parent8e24c10cdc42fdece70d420b206bb6062edb589c (diff)
downloadtraccar-server-d560f0cfdbbe9639e681bfeedd25d4de845d6161.tar.gz
traccar-server-d560f0cfdbbe9639e681bfeedd25d4de845d6161.tar.bz2
traccar-server-d560f0cfdbbe9639e681bfeedd25d4de845d6161.zip
Refactor model classes
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/DataManager.java2
-rw-r--r--src/org/traccar/database/ObjectConverter.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 4b8f4d5e8..d53ec7838 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -180,7 +180,7 @@ public class DataManager {
private NamedParameterStatement.Params assignVariables(NamedParameterStatement.Params params, Position position) throws SQLException {
params.setLong("device_id", position.getDeviceId());
- params.setTimestamp("time", position.getTime());
+ params.setTimestamp("time", position.getFixTime());
params.setBoolean("valid", position.getValid());
params.setDouble("altitude", position.getAltitude());
params.setDouble("latitude", position.getLatitude());
diff --git a/src/org/traccar/database/ObjectConverter.java b/src/org/traccar/database/ObjectConverter.java
index 072ab7a7d..bd5b03064 100644
--- a/src/org/traccar/database/ObjectConverter.java
+++ b/src/org/traccar/database/ObjectConverter.java
@@ -36,7 +36,7 @@ public class ObjectConverter {
JsonObjectBuilder object = Json.createObjectBuilder();
//object.add("id", position.getId());
- object.add("time", dateFormat.format(position.getTime()));
+ object.add("time", dateFormat.format(position.getFixTime()));
object.add("valid", position.getValid());
object.add("latitude", position.getLatitude());
object.add("longitude", position.getLongitude());