修改django的setting.py
USE_TZ = False
TIME_ZONE = "Asia/Shanghai"
- 重启apache
systemctl restart httpd
更改服务器时区(可选)
timedatectl set-timezone Asia/Shanghai
USE_TZ = False
TIME_ZONE = "Asia/Shanghai"
systemctl restart httpd
timedatectl set-timezone Asia/Shanghai
本文标题:django 时间设置,服务器时间同步
本文链接:https://www.haomeiwen.com/subject/evnvrctx.html
网友评论