diff options
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | lib/Travel/Routing/DE/EFA.pm | 7 |
2 files changed, 9 insertions, 0 deletions
@@ -2,6 +2,8 @@ git HEAD * Add URLs for several austrian EFA services (pointed out by Gregor Herrmann) + * Support EFA services which do not distinguish between scheduled + and realtime data (pointed out by Gregor Herrmann) Travel::Routing::DE::VRR 2.06 - Sat Aug 02 2014 diff --git a/lib/Travel/Routing/DE/EFA.pm b/lib/Travel/Routing/DE/EFA.pm index e2132c1..931b634 100644 --- a/lib/Travel/Routing/DE/EFA.pm +++ b/lib/Travel/Routing/DE/EFA.pm @@ -555,6 +555,13 @@ sub parse_xml_part { my @e_amap_rm = $e_arr->findnodes($xp_mapitem_rm); my @e_amap_sm = $e_arr->findnodes($xp_mapitem_sm); + # not all EFA services distinguish between scheduled and realtime + # data. Set sdate / stime to date / time when not provided. + $e_dsdate //= $e_ddate; + $e_dstime //= $e_dtime; + $e_asdate //= $e_adate; + $e_astime //= $e_atime; + my $delay = $e_delay ? $e_delay->getAttribute('delayMinutes') : 0; my ( @dep_rms, @dep_sms, @arr_rms, @arr_sms ); |