aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-06-09 15:57:50 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2017-06-09 15:57:50 -0700
commit2c82232375a16c1b3f5a62e2e5561d37a482dff9 (patch)
tree1589966abc68b322b8ead435a47d873989e96bfa
parentd50a27b19bfdaf503e3e569d8a642591c49e7f19 (diff)
downloadtraccar-server-2c82232375a16c1b3f5a62e2e5561d37a482dff9.tar.gz
traccar-server-2c82232375a16c1b3f5a62e2e5561d37a482dff9.tar.bz2
traccar-server-2c82232375a16c1b3f5a62e2e5561d37a482dff9.zip
Small trips calculation optimization
-rw-r--r--src/org/traccar/reports/Trips.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/reports/Trips.java b/src/org/traccar/reports/Trips.java
index eeb2f2681..966c3a817 100644
--- a/src/org/traccar/reports/Trips.java
+++ b/src/org/traccar/reports/Trips.java
@@ -55,7 +55,7 @@ public final class Trips {
TripReport trip = new TripReport();
- long tripDuration = endTrip.getFixTime().getTime() - positions.get(startIndex).getFixTime().getTime();
+ long tripDuration = endTrip.getFixTime().getTime() - startTrip.getFixTime().getTime();
long deviceId = startTrip.getDeviceId();
trip.setDeviceId(deviceId);
trip.setDeviceName(Context.getIdentityManager().getDeviceById(deviceId).getName());