From 2c82232375a16c1b3f5a62e2e5561d37a482dff9 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 9 Jun 2017 15:57:50 -0700 Subject: Small trips calculation optimization --- src/org/traccar/reports/Trips.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org/traccar/reports') 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()); -- cgit v1.2.3