diff options
author | Olaf Conradi | 2013-12-28 21:43:24 +0100 |
---|---|---|
committer | Olaf Conradi | 2013-12-28 21:43:24 +0100 |
commit | c4760090fd368e415023f5ef4ad4ec6a620a249b (patch) | |
tree | 0f181559a2e00546f42efe4241982d318ccdf12e /conf/common.inc.php | |
parent | Merge pull request #32 from jbergstroem/parantheses_in_names (diff) | |
download | apt-panopticon_cgp-c4760090fd368e415023f5ef4ad4ec6a620a249b.zip apt-panopticon_cgp-c4760090fd368e415023f5ef4ad4ec6a620a249b.tar.gz apt-panopticon_cgp-c4760090fd368e415023f5ef4ad4ec6a620a249b.tar.bz2 apt-panopticon_cgp-c4760090fd368e415023f5ef4ad4ec6a620a249b.tar.xz |
Add default timezone when system one is missing
Suppresses all the PHP warnings in the error logging.
Diffstat (limited to 'conf/common.inc.php')
-rw-r--r-- | conf/common.inc.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/conf/common.inc.php b/conf/common.inc.php index 165c73f..506134d 100644 --- a/conf/common.inc.php +++ b/conf/common.inc.php | |||
@@ -4,3 +4,7 @@ require_once 'config.php'; | |||
4 | 4 | ||
5 | $CONFIG['webdir'] = preg_replace('/\/[a-z\.]+$/', '', $_SERVER['SCRIPT_FILENAME']); | 5 | $CONFIG['webdir'] = preg_replace('/\/[a-z\.]+$/', '', $_SERVER['SCRIPT_FILENAME']); |
6 | $CONFIG['weburl'] = preg_replace('/(?<=\/)[a-z\.]+$/', '', $_SERVER['SCRIPT_NAME']); | 6 | $CONFIG['weburl'] = preg_replace('/(?<=\/)[a-z\.]+$/', '', $_SERVER['SCRIPT_NAME']); |
7 | |||
8 | if (!ini_get('date.timezone')) { | ||
9 | date_default_timezone_set($CONFIG['default_timezone']); | ||
10 | } | ||