diff options
author | Mathieu Chabanon <git@matchab.fr> | 2013-03-10 14:06:12 +0100 |
---|---|---|
committer | Mathieu Chabanon <git@matchab.fr> | 2013-03-10 14:06:12 +0100 |
commit | cb49ab945f9fe33d2ceb05c97bc2ddbdbcccc7c2 (patch) | |
tree | 18515965692e34a42b53773eefa8025d490f68c0 /index.php | |
parent | 310f3ca0079a03eaa627f94b65486e4547aeb3d9 (diff) | |
download | Shaarli-cb49ab945f9fe33d2ceb05c97bc2ddbdbcccc7c2.tar.gz Shaarli-cb49ab945f9fe33d2ceb05c97bc2ddbdbcccc7c2.tar.zst Shaarli-cb49ab945f9fe33d2ceb05c97bc2ddbdbcccc7c2.zip |
Avoid a strict standard error when php.ini do not define the default
timezone.
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -5,6 +5,12 @@ | |||
5 | // Licence: http://www.opensource.org/licenses/zlib-license.php | 5 | // Licence: http://www.opensource.org/licenses/zlib-license.php |
6 | // Requires: php 5.1.x (but autocomplete fields will only work if you have php 5.2.x) | 6 | // Requires: php 5.1.x (but autocomplete fields will only work if you have php 5.2.x) |
7 | // ----------------------------------------------------------------------------------------------- | 7 | // ----------------------------------------------------------------------------------------------- |
8 | // NEVER TRUST IN PHP.INI | ||
9 | // Some hosts do not define a default timezone in php.ini, | ||
10 | // so we have to do this for avoid the strict standard error. | ||
11 | date_default_timezone_set('UTC'); | ||
12 | |||
13 | // ----------------------------------------------------------------------------------------------- | ||
8 | // Hardcoded parameter (These parameters can be overwritten by creating the file /config/options.php) | 14 | // Hardcoded parameter (These parameters can be overwritten by creating the file /config/options.php) |
9 | $GLOBALS['config']['DATADIR'] = 'data'; // Data subdirectory | 15 | $GLOBALS['config']['DATADIR'] = 'data'; // Data subdirectory |
10 | $GLOBALS['config']['CONFIG_FILE'] = $GLOBALS['config']['DATADIR'].'/config.php'; // Configuration file (user login/password) | 16 | $GLOBALS['config']['CONFIG_FILE'] = $GLOBALS['config']['DATADIR'].'/config.php'; // Configuration file (user login/password) |