diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-02-02 09:24:38 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-02-02 09:24:38 +0100 |
commit | b64e1979e974cf3b40be0831d1e3ce08860076d8 (patch) | |
tree | 7a771bf3ed54d499bcba687bfda935c7b2f3499a /lib/Travel/Status/DE/DBRIS | |
parent | e15bfec43fff4e21dd8f8be1a4dfcbf39840b0fb (diff) |
Location->TO_JSON: convert DateTime to epoch
Diffstat (limited to 'lib/Travel/Status/DE/DBRIS')
-rw-r--r-- | lib/Travel/Status/DE/DBRIS/Location.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/DBRIS/Location.pm b/lib/Travel/Status/DE/DBRIS/Location.pm index b44989e..9c01bf3 100644 --- a/lib/Travel/Status/DE/DBRIS/Location.pm +++ b/lib/Travel/Status/DE/DBRIS/Location.pm @@ -116,6 +116,12 @@ sub TO_JSON { my $ret = { %{$self} }; + for my $k (qw(sched_dep rt_dep dep sched_arr rt_arr arr)) { + if ( $ret->{$k} ) { + $ret->{$k} = $ret->{$k}->epoch; + } + } + return $ret; } |