Avoid a strict standard error when php.ini do not define the default

timezone.
This commit is contained in:
Mathieu Chabanon 2013-03-10 14:06:12 +01:00
parent 310f3ca007
commit cb49ab945f

View file

@ -4,6 +4,12 @@
// http://sebsauvage.net/wiki/doku.php?id=php:shaarli // http://sebsauvage.net/wiki/doku.php?id=php:shaarli
// Licence: http://www.opensource.org/licenses/zlib-license.php // Licence: http://www.opensource.org/licenses/zlib-license.php
// Requires: php 5.1.x (but autocomplete fields will only work if you have php 5.2.x) // Requires: php 5.1.x (but autocomplete fields will only work if you have php 5.2.x)
// -----------------------------------------------------------------------------------------------
// NEVER TRUST IN PHP.INI
// Some hosts do not define a default timezone in php.ini,
// so we have to do this for avoid the strict standard error.
date_default_timezone_set('UTC');
// ----------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------
// Hardcoded parameter (These parameters can be overwritten by creating the file /config/options.php) // Hardcoded parameter (These parameters can be overwritten by creating the file /config/options.php)
$GLOBALS['config']['DATADIR'] = 'data'; // Data subdirectory $GLOBALS['config']['DATADIR'] = 'data'; // Data subdirectory