diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-12-05 00:00:36 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-12-05 00:00:36 +0100 |
commit | 38c853a1c1fdb168667ff6a3fd523deac0b15a2e (patch) | |
tree | adc158ecd31b8c7975e79e92b92ae572984d11c1 /lib/Travel/Status/DE/IRIS | |
parent | af3e174aaf9d2560fcc49ebc6f6ea5e24545fbac (diff) |
Fix a crash when a train has unscheduled additional stops starting at the selected station
Diffstat (limited to 'lib/Travel/Status/DE/IRIS')
-rw-r--r-- | lib/Travel/Status/DE/IRIS/Result.pm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm index d4d994e..e1cb513 100644 --- a/lib/Travel/Status/DE/IRIS/Result.pm +++ b/lib/Travel/Status/DE/IRIS/Result.pm @@ -102,6 +102,13 @@ sub add_ar { time_zone => 'Europe/Berlin', ); + # unscheduled arrivals may not appear in the plan, but we do need to + # know their planned arrival time + if ( $attrib{plan_arrival_ts} ) { + $self->{sched_arrival} + = $strp->parse_datetime( $attrib{plan_arrival_ts} ); + } + if ( $attrib{arrival_ts} ) { $self->{arrival} = $strp->parse_datetime( $attrib{arrival_ts} ); $self->{delay} @@ -139,6 +146,13 @@ sub add_dp { time_zone => 'Europe/Berlin', ); + # unscheduled arrivals may not appear in the plan, but we do need to + # know their planned arrival time + if ( $attrib{plan_departure_ts} ) { + $self->{sched_departure} + = $strp->parse_datetime( $attrib{plan_departure_ts} ); + } + if ( $attrib{departure_ts} ) { $self->{departure} = $strp->parse_datetime( $attrib{departure_ts} ); $self->{delay} @@ -535,7 +549,7 @@ sub translate_msg { 64 => 'Weichenstörung', 55 => 'Technische Störung an einem anderen Zug', # ? 57 => 'Zusätzlicher Halt', # ? - 58 => 'Umleitung', # ? + 58 => 'Umleitung', # ? 61 => 'Türstörung', 62 => 'Behobene technische Störung am Zug', 63 => 'Technische Untersuchung am Zug', |