lesson learned: do not deploy from easterhegg

This commit is contained in:
Birte Kristina Friesel 2024-03-31 21:22:50 +02:00
parent b978ba6bc0
commit 6e42d1dc29
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -85,11 +85,11 @@ sub get_json_p {
sub get_departures_p {
my ( $self, %opt ) = @_;
my $when
= $opt{timestamp}
my $when = (
$opt{timestamp}
? $opt{timestamp}->clone
: DateTime->now( time_zone => 'Europe/Berlin' );
->subtract( minutes => $opt{lookbehind} );
: DateTime->now( time_zone => 'Europe/Berlin' )
)->subtract( minutes => $opt{lookbehind} );
return Travel::Status::DE::HAFAS->new_p(
station => $opt{eva},
datetime => $when,