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 /lib/Travel | |
parent | b11161f0b8dac170afbf72e5f802be653a597437 (diff) |
support EFA services which do not set itdDateTimeTarget
Diffstat (limited to 'lib/Travel')
-rw-r--r-- | lib/Travel/Routing/DE/EFA.pm | 7 |
1 files changed, 7 insertions, 0 deletions
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 ); |