From cfca41b0126cd2f4d9aeb77559cd75e4535d3a24 Mon Sep 17 00:00:00 2001 From: fBrignoli Date: Fri, 23 Sep 2011 17:07:45 +0000 Subject: [PATCH] [-] FO : "It is not safe to rely on the system's timezone ..." due to cookie use before timezone init git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8753 b9a71923-0436-4b27-9f14-aed3839534dd --- config/config.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index aa89d9d38..da2864d49 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -100,6 +100,10 @@ Language::loadLanguages(); $defaultCountry = new Country(Configuration::get('PS_COUNTRY_DEFAULT'), Configuration::get('PS_LANG_DEFAULT')); Context::getContext()->country = $defaultCountry; +/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */ +if (function_exists('date_default_timezone_set')) + @date_default_timezone_set(Configuration::get('PS_TIMEZONE')); + /* Instantiate cookie */ $cookieLifetime = (time() + (((int)Configuration::get('PS_COOKIE_LIFETIME_BO') > 0 ? (int)Configuration::get('PS_COOKIE_LIFETIME_BO') : 1)* 3600)); if (defined('_PS_ADMIN_DIR_')) @@ -153,10 +157,6 @@ define('_PS_OS_BANKWIRE_', Configuration::get('PS_OS_BANKWIRE')); define('_PS_OS_PAYPAL_', Configuration::get('PS_OS_PAYPAL')); define('_PS_OS_WS_PAYMENT_', Configuration::get('PS_OS_WS_PAYMENT')); -/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */ -if (function_exists('date_default_timezone_set')) - @date_default_timezone_set(Configuration::get('PS_TIMEZONE')); - /* Smarty */ if (!defined('_PS_ADMIN_DIR_')) require_once(dirname(__FILE__).'/smarty.config.inc.php'); @@ -168,3 +168,4 @@ Context::getContext()->smarty = $smarty; (for 'URL' append SMARTY_DEBUG as a parameter to the url) default is false for production environment */ define('SMARTY_DEBUG_CONSOLE', false); +