From 2dab71fdefc2d4f449d41437588b7a56d701ed68 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 19 May 2024 19:56:56 +0200 Subject: EFA->new: Add datetime option --- lib/Travel/Status/DE/EFA.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/Travel/Status') diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm index 79be16b..f42e0a0 100644 --- a/lib/Travel/Status/DE/EFA.pm +++ b/lib/Travel/Status/DE/EFA.pm @@ -175,7 +175,8 @@ sub new { if ( not $opt{efa_url} ) { confess('service or efa_url must be specified'); } - my $now = DateTime->now( time_zone => $opt{time_zone} // 'Europe/Berlin' ); + my $dt = $opt{datetime} + // DateTime->now( time_zone => $opt{time_zone} // 'Europe/Berlin' ); ## no critic (RegularExpressions::ProhibitUnusedCapture) ## no critic (Variables::ProhibitPunctuationVars) @@ -789,6 +790,11 @@ B (stop/station name). address / poi / stop name to list departures for. +=item B => I + +Request departures for the date/time specified by I. +Default: now. + =item B => I Some EFA servers do not correctly specify their response encoding. If you -- cgit v1.2.3