# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'UTC'
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
你的内心有两种价值设置.py你知道吗
通过设置这两个变量,可以控制django存储和打印日期的方式。你知道吗
这并不是对您的问题的严格回答,但一般来说,最佳做法是以UTC格式存储时间,并在显示时将其转换为所需的任何时区。这样时间就不那么模棱两可了。你知道吗
相关问题 更多 >
编程相关推荐