Django > python manage.py runserver时报错。
Database returned an invalid datetime value. Are time zone definitions for your database installed?
解决方案:
修改settings.py的时区变量。
修改前:
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N =True
USE_L10N =True
USE_TZ = True
修改后:
LANGUAGE_CODE ='zh-hans'
TIME_ZONE ='Asia/Shanghai'
USE_I18N =True
USE_L10N =True
USE_TZ =False
运行成功。
参考:https://www.cnblogs.com/yy3b2007com/p/7601940.html