diff options
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r-- | lib/Travel/Status/DE/URA.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Travel/Status/DE/URA.pm b/lib/Travel/Status/DE/URA.pm index c525ffd..4683f34 100644 --- a/lib/Travel/Status/DE/URA.pm +++ b/lib/Travel/Status/DE/URA.pm @@ -148,16 +148,18 @@ sub results { next; } + $timestamp /= 1000; + + if ( $hide_past and $ts_now > $timestamp ) { + next; + } + my $dt_dep = DateTime->from_epoch( - epoch => $timestamp / 1000, + epoch => $timestamp, time_zone => 'Europe/Berlin' ); my $ts_dep = $dt_dep->epoch; - if ( $hide_past and $dt_dep->subtract_datetime($dt_now)->is_negative ) { - next; - } - if ($full_routes) { @route = map { [ $_->[9] / 1000, $_->[1] ] } grep { $_->[8] == $tripid } @{ $self->{raw_list} }; |