【发布时间】:2018-04-29 11:41:01
【问题描述】:
这是我在 settings.py 中的时区设置
TIME_ZONE = 'Asia/Kolkata'
# See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code
LANGUAGE_CODE = 'en-us'
# See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id
SITE_ID = 1
# See: https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
USE_I18N = True
# See: https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n
USE_L10N = True
# See: https://docs.djangoproject.com/en/dev/ref/settings/#use-tz
USE_TZ = False
现在当我使用 timezone.now() 时,我总是得到 UTC 时间。我错过了什么
【问题讨论】: