From a5cdddd4a304f75645a2b89b7e834e5750466c5b Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 10 Jun 2016 20:08:44 +0500 Subject: Fixed broken repeated event suppression --- src/org/traccar/database/DataManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar') 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 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 getGeofences() throws SQLException { -- cgit v1.2.3