Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

给Artalk增加修改默认时区配置项 #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Config.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
return [
// 网站名
'site_name' => 'XXX 的博客',
// 时区
'TimeZone' => 'Asia/Shanghai',
// 支持跨域访问的域名
'allow_origin' => [
'http://localhost:8080' // 或 '*' 跨域无限制
Expand Down
1 change: 1 addition & 0 deletions app/components/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public function actionCommentAdd()
$comment->page_key = $pageKey;
$comment->rid = $rid;
$comment->ua = $ua;
$TimeZone = date_default_timezone_set(_config()['TimeZone']);
$comment->date = date("Y-m-d H:i:s");
$comment->ip = $this->getUserIP();
$comment->is_collapsed = false;
Expand Down