I've done:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
As per:
mysql> select count(*) from `mysql`.`time_zone_name`;
+----------+
| count(*) |
+----------+
| 1778 |
+----------+
And my env has pytz:
$ pip list | grep pytz
pytz (2014.2)
But I'm still getting
ValueError: Database returned an invalid value in QuerySet.datetimes(). Are time zone definitions for your database and pytz installed?
What could be the cause?
default-time-zone is probably not set in your my.cnf file. Try adding
default-time-zone = 'UTC'
to your /etc/mysql/my.cnf
in [mysqld]
section.
I had the same problem solved by flushing MySQL after importing time-zones.
mysql> flush tables;
Query OK, 0 rows affected (0.01 sec)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With