summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-19 19:56:56 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-19 19:56:56 +0200
commit2dab71fdefc2d4f449d41437588b7a56d701ed68 (patch)
treed5c9308aa3af085bb6babe1887f2ddc2c04c9393 /lib
parent47f45a0048225a51e75310a737941fd03087325d (diff)
EFA->new: Add datetime option
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/EFA.pm8
1 files changed, 7 insertions, 1 deletions
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> (stop/station name).
address / poi / stop name to list departures for.
+=item B<datetime> => I<DateTime object>
+
+Request departures for the date/time specified by I<DateTime object>.
+Default: now.
+
=item B<efa_encoding> => I<encoding>
Some EFA servers do not correctly specify their response encoding. If you