Browse Source

Fix wrong default timezone

master
filesite 7 months ago
parent
commit
0f9c9808de
  1. 2
      conf/app.php
  2. 2
      www/index.php

2
conf/app.php

@ -3,7 +3,7 @@
* Config * Config
*/ */
return array( return array(
'default_timezone' => 'Asia/Shanghai', //timezone 'default_timezone' => 'Asia/Hong_Kong', //timezone, check more: https://www.php.net/manual/en/timezones.asia.php
'content_directory' => 'content', //directory of contents 'content_directory' => 'content', //directory of contents
'theme' => '', //name of theme which is enabled 'theme' => '', //name of theme which is enabled

2
www/index.php

@ -2,7 +2,7 @@
/* All php controller enter from here */ /* All php controller enter from here */
$start_time = microtime(true); //for time cost $start_time = microtime(true); //for time cost
$config = require_once __DIR__ . '/../conf/app.php'; $config = require_once __DIR__ . '/../conf/app.php';
$default_timezone = !empty($config['default_timezone']) ? $config['default_timezone'] : 'Hongkong'; $default_timezone = !empty($config['default_timezone']) ? $config['default_timezone'] : 'Asia/Hong_Kong';
date_default_timezone_set($default_timezone); date_default_timezone_set($default_timezone);
$config['start_time'] = $start_time; $config['start_time'] = $start_time;

Loading…
Cancel
Save