summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-08-03 22:03:26 +0200
committerDaniel Friesel <derf@finalrewind.org>2014-08-03 22:03:26 +0200
commit23b5098a8528ae7c5ad5299ce2e108699f96e9fc (patch)
treee9ae56e2f70356ba38260c1917f5659ef14ffef8 /lib/Travel
parentb11161f0b8dac170afbf72e5f802be653a597437 (diff)
support EFA services which do not set itdDateTimeTarget
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Routing/DE/EFA.pm7
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 );