From 17a8310c0382eaee52c832be72196cdca201382d Mon Sep 17 00:00:00 2001 From: skoh-fley Date: Sat, 8 Dec 2012 13:38:47 -0800 Subject: [PATCH] Set default timezone to stop PHP warnings in some cases --- index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.php b/index.php index 8ce4122..27c83dc 100644 --- a/index.php +++ b/index.php @@ -20,6 +20,11 @@ session_start(); // Tell all files to include relative to THIS FILE's directory set_include_path(dirname($_SERVER['SCRIPT_FILENAME'])); +// Avoid warnings about unset timezones by setting it to the server's timezone +if( function_exists("date_default_timezone_set") +and function_exists("date_default_timezone_get")) + @date_default_timezone_set(@date_default_timezone_get()); + // Autoload any class which is used in this file function __autoload($class) { if(file_exists('classes/' . $class . '.php')) -- knotmirror 0.0.1