]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Avoid a strict standard error when php.ini do not define the default
authorMathieu Chabanon <git@matchab.fr>
Sun, 10 Mar 2013 13:06:12 +0000 (14:06 +0100)
committerMathieu Chabanon <git@matchab.fr>
Sun, 10 Mar 2013 13:06:12 +0000 (14:06 +0100)
timezone.

index.php

index adc11f9bc4405087983e996c0ebeebeb75131eb9..9b628c6beac0a9f43bcedc34a42ae8c4e45ad6b3 100644 (file)
--- 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