diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-31 14:44:37 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-03-31 14:44:37 +0200 |
commit | 970e30202dc1caa3f81f3351b4186d8cde3ddd97 (patch) | |
tree | 3dffb1ab8642e5a380dd52fb2e0e379cf1a32c16 /lib/Travelynx/Helper | |
parent | 9f0d72b9d14a57479f5f6e6d15314549b47a7c2f (diff) |
HAFAS departures: add earlier / later links
Diffstat (limited to 'lib/Travelynx/Helper')
-rw-r--r-- | lib/Travelynx/Helper/HAFAS.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm index 64f2949..6cbaf11 100644 --- a/lib/Travelynx/Helper/HAFAS.pm +++ b/lib/Travelynx/Helper/HAFAS.pm @@ -85,7 +85,9 @@ sub get_json_p { sub get_departures_p { my ( $self, %opt ) = @_; - my $when = DateTime->now( time_zone => 'Europe/Berlin' ) + my $when + = ( $opt{timestamp}->clone + // DateTime->now( time_zone => 'Europe/Berlin' ) ) ->subtract( minutes => $opt{lookbehind} ); return Travel::Status::DE::HAFAS->new_p( station => $opt{eva}, |