From 192d0dbb4516c2ce8bed7c4e1f2626e70aa2f1fd Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Tue, 18 Oct 2016 14:07:31 -0400 Subject: [PATCH] added TimeZone get API --- web/api/app/Controller/HostController.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/api/app/Controller/HostController.php b/web/api/app/Controller/HostController.php index 57b210a7e..4fdb48cba 100644 --- a/web/api/app/Controller/HostController.php +++ b/web/api/app/Controller/HostController.php @@ -99,7 +99,18 @@ class HostController extends AppController { )); } + function getTimeZone() + { + //http://php.net/manual/en/function.date-default-timezone-get.php + $tz = date_default_timezone_get(); + $this->set(array( + 'tz' => $tz, + '_serialize' => array('tz') + )); + } + function getVersion() { + //throw new UnauthorizedException(__('API Disabled')); $version = Configure::read('ZM_VERSION'); // not going to use the ZM_API_VERSION // requires recompilation and dependency on ZM upgrade