diff options
author | ramon <ramongomez@us.es> | 2018-02-06 18:46:50 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2018-02-06 18:46:50 +0000 |
commit | 7e7c0cddb47377e12dad60d56f8380a66752b097 (patch) | |
tree | d73c7b75d628cbf55668a8d86af001587b62e98c /admin/WebConsole/rest | |
parent | 325aac99124307b9685689e659332d995a4bb760 (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.php | 6 |
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. |