Error
File "/home/kuba/.virtualenvs/VeeU/lib/python3.5/site-packages/django/db/models/sql/compiler.py" in apply_converters
779. value = converter(value, expression, self.connection, self.query.context)
File "/home/kuba/.virtualenvs/VeeU/lib/python3.5/site-packages/django/db/models/functions/datetime.py" in convert_value
181. "Database returned an invalid datetime value. "
ValueError: Database returned an invalid datetime value. Are time zone definitions for your database installed?
Solution
1. Linux
contact@me:~$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
contact@me:~$ mysql -u root -p -e "flush tables;" mysql
2. Windows
1) Download posix timezone sql from https://dev.mysql.com/downloads/timezones.html
2) Do not move anything, just open this sql file in MySQL Workbench and add USE mysql; to the first line.
3) Run this file and that's it
* How to run SQL script in MySQL?
1. If you’re at the MySQL command line mysql> you have to declare the SQL file as source.
mysql> source \home\user\Desktop\test.sql;
2. CMD
Ref.
* MariaDB에서 root 암호 인증 방식이 먹히지 않는 이유(feat. unix_socket)