【发布时间】:2019-04-09 10:59:41
【问题描述】:
我应该使用什么时区值,或者我应该怎么做才能显示“ET”而不是“EST”或“EDT”?此外,我正在使用 pytz 来执行我的功能。谢谢。
settings.py:
#currently this shows "EDT"
TIME_ZONE = 'US/Eastern'
#where this shows "EST"
TIME_ZONE = 'America/Cancun'
post_template.html:
#outputs Oct 30,2018, 5:38AM/EST
{{post.modified|date:"M d,Y, g:iA/e"}}
【问题讨论】:
标签: python django timezone pytz