From 0f9cda3eb8afd89a9a2470d9a4c19a5c1c69b092 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 31 Aug 2024 12:24:59 +0200 Subject: streamline locale and timezone handling --- lib/Object/Groupware/DAV.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/Object/Groupware/DAV.pm') 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 - 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; -- cgit v1.2.3