From 0f9c9808de25bbe7a27bdc9b196ecf379baade71 Mon Sep 17 00:00:00 2001 From: filesite Date: Thu, 9 May 2024 06:09:59 +0800 Subject: [PATCH] Fix wrong default timezone --- conf/app.php | 2 +- www/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.php b/conf/app.php index 90b5298..d041c28 100644 --- a/conf/app.php +++ b/conf/app.php @@ -3,7 +3,7 @@ * Config */ 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 'theme' => '', //name of theme which is enabled diff --git a/www/index.php b/www/index.php index 53fb006..a37d0e6 100644 --- a/www/index.php +++ b/www/index.php @@ -2,7 +2,7 @@ /* All php controller enter from here */ $start_time = microtime(true); //for time cost $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); $config['start_time'] = $start_time;