diff options
author | ShevAbam <shevabam@gmail.com> | 2016-01-08 14:46:38 +0100 |
---|---|---|
committer | ShevAbam <shevabam@gmail.com> | 2016-01-08 14:46:38 +0100 |
commit | 3f2f0db10c0a3a13c0593628768a8794aaa800c8 (patch) | |
tree | 5a97c8ffd9135f281b5a502a607e240572e65fbd /libs/system.php | |
parent | 30db2217136c5b64845a1104e4f5fbea4badf0bd (diff) |
System : prevents error with date if there is no date.timezone defined in php.ini
Diffstat (limited to 'libs/system.php')
-rw-r--r-- | libs/system.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/system.php b/libs/system.php index d28ff53..5aea939 100644 --- a/libs/system.php +++ b/libs/system.php @@ -1,5 +1,6 @@ <?php require '../autoload.php'; +date_default_timezone_set(@date_default_timezone_get()); // Hostname $hostname = php_uname('n'); @@ -54,7 +55,6 @@ if (!($current_users = shell_exec('who -u | awk \'{ print $1 }\' | wc -l'))) // Server datetime if (!($server_date = shell_exec('/bin/date'))) { - date_default_timezone_set(@date_default_timezone_get()); $server_date = date('Y-m-d H:i:s'); } |