From 10acec329cce1356b3965a1ae3819711f21e5939 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 22 Nov 2023 21:21:32 +0100 Subject: Route/Part#via: Prefer arrival time over departure time --- lib/Travel/Routing/DE/EFA.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Travel/Routing') diff --git a/lib/Travel/Routing/DE/EFA.pm b/lib/Travel/Routing/DE/EFA.pm index c294a8e..79e6636 100644 --- a/lib/Travel/Routing/DE/EFA.pm +++ b/lib/Travel/Routing/DE/EFA.pm @@ -717,8 +717,8 @@ sub parse_xml_part { $hash->{arrival_stationmaps} = \@arr_sms; for my $ve ( $e->findnodes($xp_via) ) { - my $e_vdate = ( $ve->findnodes($xp_date) )[-1]; - my $e_vtime = ( $ve->findnodes($xp_time) )[-1]; + my $e_vdate = ( $ve->findnodes($xp_date) )[0]; + my $e_vtime = ( $ve->findnodes($xp_time) )[0]; if ( not( $e_vdate and $e_vtime ) or ( $e_vdate->getAttribute('weekday') == -1 ) ) -- cgit v1.2.3