diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-31 21:21:59 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-31 21:21:59 +0200 |
commit | b978ba6bc0c1f429f02990c2439977b2bd4fbe42 (patch) | |
tree | db2c097b3732c6bc6b8670692b002ac2e7b4e452 | |
parent | 38e03bcc8815641eb57c9cd6137616938de43d5d (diff) |
oops2.6.2
-rw-r--r-- | lib/Travelynx/Helper/HAFAS.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm index 6cbaf11..e0f4706 100644 --- a/lib/Travelynx/Helper/HAFAS.pm +++ b/lib/Travelynx/Helper/HAFAS.pm @@ -86,9 +86,10 @@ sub get_departures_p { my ( $self, %opt ) = @_; my $when - = ( $opt{timestamp}->clone - // DateTime->now( time_zone => 'Europe/Berlin' ) ) - ->subtract( minutes => $opt{lookbehind} ); + = $opt{timestamp} + ? $opt{timestamp}->clone + : DateTime->now( time_zone => 'Europe/Berlin' ); + ->subtract( minutes => $opt{lookbehind} ); return Travel::Status::DE::HAFAS->new_p( station => $opt{eva}, datetime => $when, |