aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/conf
diff options
context:
space:
mode:
authorOlaf Conradi2013-12-28 21:43:24 +0100
committerOlaf Conradi2013-12-28 21:43:24 +0100
commitc4760090fd368e415023f5ef4ad4ec6a620a249b (patch)
tree0f181559a2e00546f42efe4241982d318ccdf12e /conf
parentMerge pull request #32 from jbergstroem/parantheses_in_names (diff)
downloadapt-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')
-rw-r--r--conf/common.inc.php4
-rw-r--r--conf/config.php3
2 files changed, 7 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
8if (!ini_get('date.timezone')) {
9 date_default_timezone_set($CONFIG['default_timezone']);
10}
diff --git a/conf/config.php b/conf/config.php
index 6c0572e..7107841 100644
--- a/conf/config.php
+++ b/conf/config.php
@@ -66,6 +66,9 @@ $CONFIG['detail-heigth'] = 350;
66# disabled: NULL 66# disabled: NULL
67$CONFIG['socket'] = NULL; 67$CONFIG['socket'] = NULL;
68 68
69# system default timezone when not set
70$CONFIG['default_timezone'] = 'UTC';
71
69 72
70# load local configuration 73# load local configuration
71if (file_exists(dirname(__FILE__).'/config.local.php')) 74if (file_exists(dirname(__FILE__).'/config.local.php'))