aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-06-10 20:08:44 +0500
committerAbyss777 <abyss@fox5.ru>2016-06-10 20:08:44 +0500
commita5cdddd4a304f75645a2b89b7e834e5750466c5b (patch)
tree7d0ff81a3e6f65d3b90f758aa027b78015cb12cb /src/org/traccar/database/DataManager.java
parent41fe4ca770875842f4d17531506c4bc74dc90501 (diff)
downloadtrackermap-server-a5cdddd4a304f75645a2b89b7e834e5750466c5b.tar.gz
trackermap-server-a5cdddd4a304f75645a2b89b7e834e5750466c5b.tar.bz2
trackermap-server-a5cdddd4a304f75645a2b89b7e834e5750466c5b.zip
Fixed broken repeated event suppression
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 86c930c0b..30334b78b 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -525,8 +525,8 @@ public class DataManager implements IdentityManager {
public Collection<Event> getLastEvents(long deviceId, String type, int interval) throws SQLException {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.SECOND, -interval);
- Date to = calendar.getTime();
- return getEvents(deviceId, type, new Date(), to);
+ Date from = calendar.getTime();
+ return getEvents(deviceId, type, from, new Date());
}
public Collection<Geofence> getGeofences() throws SQLException {