aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 {