Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

按照说明操作,显示页面报错:数据库返回了无效的datetime值。是否安装了数据库的时区定义? #594

Open
2 of 6 tasks
icesharp107 opened this issue Aug 4, 2022 · 2 comments

Comments

@icesharp107
Copy link

我确定我已经查看了 (标注[ ][x])


我要申请 (标注[ ][x])

  • BUG 反馈
  • 添加新的特性或者功能
  • 请求技术支持
@icesharp107
Copy link
Author

上网查了,改配置文件,USE_TZ = False
https://blog.csdn.net/weixin_45719821/article/details/123405127

@yanhuixie
Copy link

你要做的是往mysql里灌入时区数据。

  1. Populate the timezone definitions in the 'mysql' table
    mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

  2. Flush tables
    mysql -u root -p -e "flush tables;" mysql

  3. Restart mysql(通常不做也行)
    sudo service mysql restart

https://stackoverflow.com/questions/21351251/database-returned-an-invalid-value-in-queryset-dates/21571350#21571350

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants