summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2018-02-06 18:46:50 +0000
committerramon <ramongomez@us.es>2018-02-06 18:46:50 +0000
commit7e7c0cddb47377e12dad60d56f8380a66752b097 (patch)
treed73c7b75d628cbf55668a8d86af001587b62e98c /admin/WebConsole/rest
parent325aac99124307b9685689e659332d995a4bb760 (diff)
#708: Compatibilidad con funciones horarias de PHP 5.6+.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5589 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest')
-rw-r--r--admin/WebConsole/rest/common.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/admin/WebConsole/rest/common.php b/admin/WebConsole/rest/common.php
index 826e57b7..8d192035 100644
--- a/admin/WebConsole/rest/common.php
+++ b/admin/WebConsole/rest/common.php
@@ -14,6 +14,12 @@
// Common constants.
define('REST_LOGFILE', '/opt/opengnsys/log/rest.log');
+// Set time zone.
+if (function_exists("date_default_timezone_set")) {
+ if (exec("timedatectl status | awk '/Time zone/ {print $3}'", $out, $err)) {
+ date_default_timezone_set($out[0]);
+ }
+}
// Common functions.