From b83080070a813fb3f4af7f7c86f6b0e8ae0ecd51 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 12 Dec 2010 22:10:36 +0000 Subject: [PATCH] Removed Timezone warnings --- CHANGELOG.txt | 5 +++++ config.default.php | 4 ++++ includes/date_functions.inc | 2 -- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index edacf4a4..8d2b12c2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,11 @@ Legend: ! -> Note $ -> Affected files +12-Dec-2010 Joe hunt +# Removed Timezone warnings +$ config.default.php + /includes/date_functions.inc + 12-Dec-2010 Janusz Dobrowolski # [0000318] Database error after last changes related to bu 313 $ /purchasing/includes/ui/po_ui.inc diff --git a/config.default.php b/config.default.php index 692c87b5..7e8534a6 100644 --- a/config.default.php +++ b/config.default.php @@ -20,6 +20,10 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root'])) die("Restricted access"); + + if (!ini_get('date.timezone')) + ini_set('date.timezone', 'Europe/Berlin'); + // Log file for error/warning messages. Should be set to any location // writable by www server. When set to empty string logging is switched off. // Special value 'syslog' can be used for system logger usage (see php manual). diff --git a/includes/date_functions.inc b/includes/date_functions.inc index 64fdfab4..a027f89d 100644 --- a/includes/date_functions.inc +++ b/includes/date_functions.inc @@ -18,8 +18,6 @@ this can be a string either "d/m/Y" for UK/Australia/New Zealand dates or "m/d/Y" for US/Canada format dates depending on setting in preferences. */ -if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get")) - @date_default_timezone_set(@date_default_timezone_get()); function __date($year, $month, $day) { -- 2.30.2