diff options
Diffstat (limited to 'apps/tasks/lib/app.php')
-rw-r--r-- | apps/tasks/lib/app.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/tasks/lib/app.php b/apps/tasks/lib/app.php index b1e92dc6b6e..7b908420333 100644 --- a/apps/tasks/lib/app.php +++ b/apps/tasks/lib/app.php @@ -82,7 +82,7 @@ class OC_Task_App { } try { - $timezone = OC_Preferences::getValue(OCP\User::getUser(), "calendar", "timezone", "Europe/London"); + $timezone = OCP\Config::getUserValue(OCP\User::getUser(), "calendar", "timezone", "Europe/London"); $timezone = new DateTimeZone($timezone); new DateTime($request['due'], $timezone); } catch (Exception $e) { @@ -94,7 +94,7 @@ class OC_Task_App { } if ($request['percent_complete'] == 100 && !empty($request['completed'])){ try { - $timezone = OC_Preferences::getValue(OCP\User::getUser(), "calendar", "timezone", "Europe/London"); + $timezone = OCP\Config::getUserValue(OCP\User::getUser(), "calendar", "timezone", "Europe/London"); $timezone = new DateTimeZone($timezone); new DateTime($request['completed'], $timezone); } catch (Exception $e) { @@ -147,7 +147,7 @@ class OC_Task_App { $vtodo->setString('PRIORITY', $priority); if ($due) { - $timezone = OC_Preferences::getValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get()); + $timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get()); $timezone = new DateTimeZone($timezone); $due = new DateTime($due, $timezone); $vtodo->setDateTime('DUE', $due); @@ -176,7 +176,7 @@ class OC_Task_App { $completed = null; } if ($completed) { - $timezone = OC_Preferences::getValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get()); + $timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get()); $timezone = new DateTimeZone($timezone); $completed = new DateTime($completed, $timezone); $vtodo->setDateTime('COMPLETED', $completed); |