【问题标题】:Django model datetime is different in template than the database模板中的Django模型日期时间与数据库不同
【发布时间】:2021-03-06 22:57:20
【问题描述】:

添加的日期数据通常会添加到数据库中。外观相差3小时。

这是我在管理面板上保存的数据:

模板上的数据视图:

设置:

LANGUAGE_CODE = 'tr'

TIME_ZONE = 'Europe/Istanbul'

USE_I18N = True

USE_L10N = True

USE_TZ = True

Python 版本: 3.8.3

Django 版本: 3.1.1

【问题讨论】:

    标签: python-3.x django datetime django-models python-datetime


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-21
    • 2013-03-18
    • 2017-10-07
    • 2021-12-31
    • 1970-01-01
    相关资源
    最近更新 更多