We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
服务器设置为UTC+8时,日志记录的时间则总在北京时间的基础上又加8个小时。 此项设置在插件代码何处可以修改?
The text was updated successfully, but these errors were encountered:
同样的问题 基础环境是docker镜像webdevops/php-nginx:8.0,没有修改任何nginx和php时区相关的配置。 查了数据库,发现数据库里的时间是正常的。怀疑可能只是前台显示的问题。
webdevops/php-nginx:8.0
Sorry, something went wrong.
我的也是,把数据库存的时间戳拿出来看,也是快8小时。 把php.ini,配置下date.timezone = Asia/Shanghai,重启下php 然后禁用再启动下插件,就显示正常了
Access_Core.php文件第166行改成$time = (new DateTime("now", new DateTimeZone("Asia/Shanghai")))->getTimestamp(); 其中Asia/Shanghai换成想要的时区。 数据库中时间戳也错误的话执行下面这个: UPDATE typecho_access_logs SET time = UNIX_TIMESTAMP(FROM_UNIXTIME(time) - INTERVAL 6 HOUR); 其中- INTERVAL 6 HOUR);的加减号和数字根据自己的情况改动。
$time = (new DateTime("now", new DateTimeZone("Asia/Shanghai")))->getTimestamp();
Asia/Shanghai
UPDATE typecho_access_logs SET time = UNIX_TIMESTAMP(FROM_UNIXTIME(time) - INTERVAL 6 HOUR);
- INTERVAL 6 HOUR);
No branches or pull requests
服务器设置为UTC+8时,日志记录的时间则总在北京时间的基础上又加8个小时。
此项设置在插件代码何处可以修改?
The text was updated successfully, but these errors were encountered: