From: Mathieu Chabanon Date: Sun, 10 Mar 2013 13:06:12 +0000 (+0100) Subject: Avoid a strict standard error when php.ini do not define the default X-Git-Tag: v0.0.42beta~25^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=cb49ab945f9fe33d2ceb05c97bc2ddbdbcccc7c2;p=github%2Fshaarli%2FShaarli.git Avoid a strict standard error when php.ini do not define the default timezone. --- diff --git a/index.php b/index.php index adc11f9b..9b628c6b 100644 --- a/index.php +++ b/index.php @@ -4,6 +4,12 @@ // http://sebsauvage.net/wiki/doku.php?id=php:shaarli // 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) +// ----------------------------------------------------------------------------------------------- +// 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) $GLOBALS['config']['DATADIR'] = 'data'; // Data subdirectory