diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-12-26 14:00:54 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-12-26 14:00:54 +0100 |
commit | 7caeab689baf8390e12915264838c1a0da73e2ef (patch) | |
tree | 884111720493adeb6e030658ecb999364186775e /lib/Travel/Status/DE/DBRIS.pm | |
parent | 0c91406149c1ed3180bac678d679dc5ccb2140e5 (diff) |
journey: parse trip day and attributes
Diffstat (limited to 'lib/Travel/Status/DE/DBRIS.pm')
-rw-r--r-- | lib/Travel/Status/DE/DBRIS.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/DBRIS.pm b/lib/Travel/Status/DE/DBRIS.pm index 66790b2..6221622 100644 --- a/lib/Travel/Status/DE/DBRIS.pm +++ b/lib/Travel/Status/DE/DBRIS.pm @@ -95,6 +95,11 @@ sub new { time_zone => 'Europe/Berlin', ); + $self->{strpdate_obj} //= DateTime::Format::Strptime->new( + pattern => '%Y-%m-%d', + time_zone => 'Europe/Berlin', + ); + my $json = $self->{json} = JSON->new->utf8; if ( $conf{async} ) { @@ -272,7 +277,8 @@ sub parse_journey { $self->{result} = Travel::Status::DE::DBRIS::Journey->new( json => $self->{raw_json}, - strptime_obj => $self->{strptime_obj} + strpdate_obj => $self->{strpdate_obj}, + strptime_obj => $self->{strptime_obj}, ); } |