aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2013-12-29 07:01:40 -0800
committerPim van den Berg2013-12-29 07:01:40 -0800
commitde6cacbf32859f8176b2fa2ea4cab2dd8efe4238 (patch)
tree0f181559a2e00546f42efe4241982d318ccdf12e
parentMerge pull request #32 from jbergstroem/parantheses_in_names (diff)
parentAdd default timezone when system one is missing (diff)
downloadapt-panopticon_cgp-de6cacbf32859f8176b2fa2ea4cab2dd8efe4238.zip
apt-panopticon_cgp-de6cacbf32859f8176b2fa2ea4cab2dd8efe4238.tar.gz
apt-panopticon_cgp-de6cacbf32859f8176b2fa2ea4cab2dd8efe4238.tar.bz2
apt-panopticon_cgp-de6cacbf32859f8176b2fa2ea4cab2dd8efe4238.tar.xz
Merge pull request #38 from oohlaf/timezone
Add default timezone when system one is missing
-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'))