创建表使用models.DateTimeField(auto_now_add=True),使用后时间会慢8小时
在setting.py设置
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
# USE_TZ = True
创建表使用models.DateTimeField(auto_now_add=True),使用后时间会慢8小时
在setting.py设置
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
# USE_TZ = True