Commit 6093e5c4 authored by Volker Krause's avatar Volker Krause
Browse files

Apply day rollover post-processing for boat/ferry trips as well

parent 9c83d2ec
......@@ -365,6 +365,13 @@ BoatTrip ExtractorPostprocessorPrivate::processBoatTrip(BoatTrip trip) const
trip.setArrivalBoatTerminal(processPlace(trip.arrivalBoatTerminal()));
trip.setDepartureTime(processTimeForLocation(trip.departureTime(), trip.departureBoatTerminal()));
trip.setArrivalTime(processTimeForLocation(trip.arrivalTime(), trip.arrivalBoatTerminal()));
// arrival less than a day before departure is an indication of the extractor failing to detect day rollover
const auto duration = trip.departureTime().secsTo(trip.arrivalTime());
if (duration < 0 && duration > -3600*24) {
trip.setArrivalTime(trip.arrivalTime().addDays(1));
}
return trip;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment