diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-05-29 14:26:23 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-06-11 09:30:56 +0200 |
commit | d93d51b213bd3bda9bfa67d23c31dcce5a8b7fc0 (patch) | |
tree | b954e2cb2732a1b1efe8213db48e48cd044873b6 | |
parent | b74b96bfbd0b778ac50fd17f5e107c51435b1678 (diff) | |
download | Shaarli-d93d51b213bd3bda9bfa67d23c31dcce5a8b7fc0.tar.gz Shaarli-d93d51b213bd3bda9bfa67d23c31dcce5a8b7fc0.tar.zst Shaarli-d93d51b213bd3bda9bfa67d23c31dcce5a8b7fc0.zip |
Set the default timezone in index.php
-rw-r--r-- | application/config/ConfigPhp.php | 3 | ||||
-rw-r--r-- | index.php | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/application/config/ConfigPhp.php b/application/config/ConfigPhp.php index 19fecf2b..f99073af 100644 --- a/application/config/ConfigPhp.php +++ b/application/config/ConfigPhp.php | |||
@@ -66,9 +66,6 @@ class ConfigPhp implements ConfigIO | |||
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
69 | // FIXME! | ||
70 | //$configStr .= 'date_default_timezone_set('.var_export($conf['timezone'], true).');'. PHP_EOL; | ||
71 | |||
72 | if (!file_put_contents($filepath, $configStr) | 69 | if (!file_put_contents($filepath, $configStr) |
73 | || strcmp(file_get_contents($filepath), $configStr) != 0 | 70 | || strcmp(file_get_contents($filepath), $configStr) != 0 |
74 | ) { | 71 | ) { |
@@ -113,6 +113,8 @@ RainTPL::$cache_dir = $conf->get('config.RAINTPL_TMP'); // cache directory | |||
113 | $pluginManager = PluginManager::getInstance(); | 113 | $pluginManager = PluginManager::getInstance(); |
114 | $pluginManager->load($conf->get('config.ENABLED_PLUGINS')); | 114 | $pluginManager->load($conf->get('config.ENABLED_PLUGINS')); |
115 | 115 | ||
116 | date_default_timezone_set($conf->get('timezone', 'UTC')); | ||
117 | |||
116 | ob_start(); // Output buffering for the page cache. | 118 | ob_start(); // Output buffering for the page cache. |
117 | 119 | ||
118 | // In case stupid admin has left magic_quotes enabled in php.ini: | 120 | // In case stupid admin has left magic_quotes enabled in php.ini: |