aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
authorninioe <ninioe@gmail.com>2016-07-19 15:12:38 +0300
committerninioe <ninioe@gmail.com>2016-07-19 15:12:38 +0300
commite954e95547d05a34bbd36e3aa5003f4ddaf2ccd0 (patch)
treecbe6fda50d095cfc8d8c267a82feaa8812643fba /src/org/traccar/database/DataManager.java
parentbfa3fa62305858166d8acdcf6da4a6d33249877d (diff)
downloadtrackermap-server-e954e95547d05a34bbd36e3aa5003f4ddaf2ccd0.tar.gz
trackermap-server-e954e95547d05a34bbd36e3aa5003f4ddaf2ccd0.tar.bz2
trackermap-server-e954e95547d05a34bbd36e3aa5003f4ddaf2ccd0.zip
changes Anton asked me
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index e5a245568..3c8529eff 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -399,7 +399,6 @@ public class DataManager {
}
public void clearPositionsHistory() throws SQLException {
- //SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
int histDays = config.getInteger("database.positionsHistoryDays");
if (histDays == 0) {
return;
@@ -414,8 +413,7 @@ public class DataManager {
Date lastUpdate = device.getLastUpdate();
if(lastUpdate != null){
- Date dateBefore = new Date(lastUpdate.getTime() - histDays * 24 * 3600 * 1000 );
- //String dt = s.format(dateBefore);
+ Date dateBefore = new Date(lastUpdate.getTime() - histDays * 24 * 3600 * 1000);
QueryBuilder.create(dataSource, sql)
.setLong("deviceId", device.getId())