diff options
author | Jonas Smedegaard <dr@jones.dk> | 2024-08-31 12:24:59 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2024-09-01 09:18:49 +0200 |
commit | 0f9cda3eb8afd89a9a2470d9a4c19a5c1c69b092 (patch) | |
tree | b1526d09e39a1d12fbd7b25bd0483f458a51fe05 /lib/Object/Groupware/DAV.pm | |
parent | 30e1a34d6f69f514c6c1c908c0f77a651074a175 (diff) |
streamline locale and timezone handling
Diffstat (limited to 'lib/Object/Groupware/DAV.pm')
-rw-r--r-- | lib/Object/Groupware/DAV.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Object/Groupware/DAV.pm b/lib/Object/Groupware/DAV.pm index 5c191e3..5dc789d 100644 --- a/lib/Object/Groupware/DAV.pm +++ b/lib/Object/Groupware/DAV.pm @@ -3,13 +3,12 @@ use Feature::Compat::Class 0.07; package Object::Groupware::DAV 0.01; -class Object::Groupware::DAV; +class Object::Groupware::DAV : isa(Object::Groupware); use utf8; use Feature::Compat::Try; -use POSIX qw(locale_h); # resolve LC_TIME -use locale; + use Net::Netrc; use IO::Interactive::Tiny; use Log::Any qw( ); @@ -20,9 +19,6 @@ use DateTime; use Object::Groupware::Calendar; -# use system locale to format DateTime objects parsed from iCal data -DateTime->DefaultLocale( setlocale(LC_TIME) ); - field $log = Log::Any->get_logger; field $uri : param; @@ -80,7 +76,11 @@ method get ($new_uri) # 3. PROPFIND with depth: 1 # as documented at <https://stackoverflow.com/a/11673483> - return Object::Groupware::Calendar->new( data => $session->cal ); + return Object::Groupware::Calendar->new( + data => $session->cal, + dt_locale => $self->dt_locale, + dt_time_zone => $self->dt_time_zone, + ); } 1; |