diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-02-03 20:32:37 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-02-03 20:32:37 +0100 |
commit | 24cc6ff4f6e81faf8cbfbb7d5f0f19c1e0d0b47c (patch) | |
tree | 58ba83619603571a026bb02f2edc14fc2ffaaa74 /lib | |
parent | b64e1979e974cf3b40be0831d1e3ce08860076d8 (diff) |
Journey: Fix TO_JSON
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Travel/Status/DE/DBRIS/Journey.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/DBRIS/Journey.pm b/lib/Travel/Status/DE/DBRIS/Journey.pm index a177f75..853b381 100644 --- a/lib/Travel/Status/DE/DBRIS/Journey.pm +++ b/lib/Travel/Status/DE/DBRIS/Journey.pm @@ -80,6 +80,14 @@ sub TO_JSON { my $ret = { %{$self} }; + delete $ret->{strptime_obj}; + + for my $k (qw(day)) { + if ( $ret->{$k} ) { + $ret->{$k} = $ret->{$k}->epoch; + } + } + return $ret; } |