django 时间设置,服务器时间同步
2019-07-29 本文已影响0人
山高路远_海深不蓝
修改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