From c4760090fd368e415023f5ef4ad4ec6a620a249b Mon Sep 17 00:00:00 2001 From: Olaf Conradi Date: Sat, 28 Dec 2013 21:43:24 +0100 Subject: Add default timezone when system one is missing Suppresses all the PHP warnings in the error logging. --- conf/common.inc.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'conf/common.inc.php') 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'; $CONFIG['webdir'] = preg_replace('/\/[a-z\.]+$/', '', $_SERVER['SCRIPT_FILENAME']); $CONFIG['weburl'] = preg_replace('/(?<=\/)[a-z\.]+$/', '', $_SERVER['SCRIPT_NAME']); + +if (!ini_get('date.timezone')) { + date_default_timezone_set($CONFIG['default_timezone']); +} -- cgit v1.1