标签:one hang war django date asi cti 时区设置 field
django在settings配置中设置过TIME_ZONE = ‘Asia/Shanghai‘后,显示界面正常了,但是向数据库写入时间的时候,会比正常时间早8小时,在后端提示错误
RuntimeWarning: DateTimeField 模型类.字段 received a naive datetime (2018-xx-xx xx:xx:xx.137670) while time zone support is active.
RuntimeWarning)
解决办法:
在settings.py中把USE_TZ = True去掉
标签:one hang war django date asi cti 时区设置 field
原文地址:https://www.cnblogs.com/sunmingduo/p/10118345.html