summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/IRIS/Result.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-02-14 23:22:33 +0100
committerDaniel Friesel <derf@finalrewind.org>2017-02-14 23:22:33 +0100
commitcec9c94940c35f95cc9333a981725800dbdd3a04 (patch)
tree3e7e4acdf4d89ec8ae18165a0a9040ec5e1559de /lib/Travel/Status/DE/IRIS/Result.pm
parente37b7d7d4023ec27f2942be3fa4f1cb73531c046 (diff)
sort optimization
Diffstat (limited to 'lib/Travel/Status/DE/IRIS/Result.pm')
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index 7cc8c7c..96517d9 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -153,8 +153,9 @@ sub new {
my $dt = $ref->{datetime} = $dp // $ar;
- $ref->{date} = $dt->strftime('%d.%m.%Y');
- $ref->{time} = $dt->strftime('%H:%M');
+ $ref->{date} = $dt->strftime('%d.%m.%Y');
+ $ref->{time} = $dt->strftime('%H:%M');
+ $ref->{epoch} = $dt->epoch;
$ref->{route_pre} = $ref->{sched_route_pre}
= [ split( qr{[|]}, $ref->{route_pre} // q{} ) ];
@@ -432,6 +433,7 @@ sub merge_with_departure {
# departure is preferred over arrival, so overwrite default values
$self->{date} = $result->{date};
$self->{time} = $result->{time};
+ $self->{epoch} = $result->{epoch};
$self->{datetime} = $result->{datetime};
$self->{train_id} = $result->{train_id};
$self->{train_no} = $result->{train_no};