summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index a4fe72b..9534912 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -326,6 +326,16 @@ sub get_connecting_trains_p {
my $arrival
= $strp->parse_datetime(
$stop->{arrival} );
+ my $delay = undef;
+ if ( defined $hafas_train->{delay} ) {
+ $delay = $hafas_train->{delay} / 60;
+ if ( $delay
+ and $stop->{arrival} eq
+ $stop->{plannedArrival} )
+ {
+ $arrival->add( minutes => $delay );
+ }
+ }
if ( $departure->epoch >= $exclude_before )
{
$via_count{$dest}++;
@@ -337,6 +347,7 @@ sub get_connecting_trains_p {
$hafas_train->{line}
{name},
departure => $departure,
+ departure_delay => $delay
},
$dest, $arrival
]