summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-09-28 19:40:31 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-09-28 19:40:31 +0200
commit6f107754fb64585ec8b1ac571d96f1baf7b08ec9 (patch)
tree1f85d27687a0f3dac3e080963d1fb695f56af0bf /lib/Travelynx
parent9f06b52a0043bbc5a6150f4efcef975b22359b44 (diff)
get_connecting_trains: departure delay is relevant for connecting trains
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 100e88d..c70d44a 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -295,14 +295,15 @@ sub get_connecting_trains_p {
$iris_train->[2] = $strp->parse_datetime(
$stop->{arrival} );
if ( $iris_train->[2]
- and $iris_train->[0]->arrival_delay
+ and $iris_train->[0]->departure_delay
and $stop->{arrival} eq
$stop->{plannedArrival} )
{
# If the departure is delayed, but the arrival supposedly on time, we assume that this is an API issue and manually compute the expected arrival time.
# This avoids cases where a connection is shown as arriving at its destination before having departed at a previous stop.
- $iris_train->[2]->add( minutes =>
- $iris_train->[0]->arrival_delay );
+ $iris_train->[2]
+ ->add( minutes => $iris_train->[0]
+ ->departure_delay );
}
last;
}