From 24cc6ff4f6e81faf8cbfbb7d5f0f19c1e0d0b47c Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 3 Feb 2025 20:32:37 +0100 Subject: Journey: Fix TO_JSON --- lib/Travel/Status/DE/DBRIS/Journey.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Travel/Status/DE/DBRIS') 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; } -- cgit v1.2.3