Set the default timezone in index.php

This commit is contained in:
ArthurHoaro 2016-05-29 14:26:23 +02:00
parent b74b96bfbd
commit d93d51b213
2 changed files with 2 additions and 3 deletions

View file

@ -66,9 +66,6 @@ function write($filepath, $conf)
} }
} }
// FIXME!
//$configStr .= 'date_default_timezone_set('.var_export($conf['timezone'], true).');'. PHP_EOL;
if (!file_put_contents($filepath, $configStr) if (!file_put_contents($filepath, $configStr)
|| strcmp(file_get_contents($filepath), $configStr) != 0 || strcmp(file_get_contents($filepath), $configStr) != 0
) { ) {

View file

@ -113,6 +113,8 @@
$pluginManager = PluginManager::getInstance(); $pluginManager = PluginManager::getInstance();
$pluginManager->load($conf->get('config.ENABLED_PLUGINS')); $pluginManager->load($conf->get('config.ENABLED_PLUGINS'));
date_default_timezone_set($conf->get('timezone', 'UTC'));
ob_start(); // Output buffering for the page cache. ob_start(); // Output buffering for the page cache.
// In case stupid admin has left magic_quotes enabled in php.ini: // In case stupid admin has left magic_quotes enabled in php.ini: