最近博主在使用Komari的监控,但是发现Komari监控的邮件通知中的时间不是北京时间,但我在服务端VPS已经设置北京时间了,客户端也设置了,但邮件时间还是不对。

通过AI分析,这个时区是伦敦时区,经过一番搜索后发现解决方案:
在服务端VPS执行

nano /etc/systemd/system/komari.service

[Service]下添加

Environment="TZ=Asia/Shanghai"

CTRL+O保存,CTRL+X退出,然后执行服务端重启

systemctl daemon-reload
systemctl restart komari.service

至此,时间就可以了

参考文献:
https://www.nodeseek.com/post-593080-1
https://www.nodeseek.com/post-510879-1

最后修改:2026 年 02 月 06 日
如果觉得我的文章对你有用,请随意赞赏