yjanb11

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 这里我们会看见数据保存到数据库中后,入库时间变成了2014-10-31 16:00:00,这是因为settings.py时区设置为:TIME_ZONE = 'America/Chicago'的缘故,把USE_TZ = True修改为即可USE_TZ = False:

# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = False
posted on 2016-03-17 19:47  yjanb11  阅读(763)  评论(0编辑  收藏  举报