数据 shang 字符 lan 上海 nes hang time djang
1. Django的时区配置在setings.py中,默认配置如下:
- LANGUAGE_CODE = ‘en-us‘
- TIME_ZONE = ‘UTC‘
- # TIME_ZONE = ‘Asia/Shanghai‘ # 可以设置为上海时间
- USE_I18N = True
- USE_L10N = True
- USE_TZ = True
- # USE_TZ = False # 表示数据库不使用UTC时间存储
- # 时区可以设置的值在pytz.all_timezones中,这里有所有的可以设置为TIME_ZONE的字符串。
python之路--web--2--Django-5-时区
数据 shang 字符 lan 上海 nes hang time djang
原文:http://www.cnblogs.com/eaglesour/p/7906764.html
来源: http://www.bubuko.com/infodetail-2409725.html