diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-08-03 22:03:26 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-08-03 22:03:26 +0200 |
commit | 23b5098a8528ae7c5ad5299ce2e108699f96e9fc (patch) | |
tree | e9ae56e2f70356ba38260c1917f5659ef14ffef8 | |
parent | b11161f0b8dac170afbf72e5f802be653a597437 (diff) |
support EFA services which do not set itdDateTimeTarget
-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 ); |