Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
6093e5c4
Commit
6093e5c4
authored
Aug 02, 2022
by
Volker Krause
Browse files
Apply day rollover post-processing for boat/ferry trips as well
parent
9c83d2ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/extractorpostprocessor.cpp
View file @
6093e5c4
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment