MySQL backend does not support timezone-aware datetimes when USE_TZ is False.
Package:
django
59414

Exception Class:
ValueError
Raise code
return value
# MySQL doesn't support tz-aware datetimes
if timezone.is_aware(value):
if settings.USE_TZ:
value = timezone.make_naive(value, self.connection.timezone)
else:
raise ValueError("MySQL backend does not support timezone-aware datetimes when USE_TZ is False.")
return str(value)
def adapt_timefield_value(self, value):
if value is None:
return None
# Expression values are adapted by the database.
Links to the raise (1)
https://github.com/django/django/blob/7cca22964c09e8dafc313a400c428242404d527a/django/db/backends/mysql/operations.py#L250Ways to fix
To fix it, just set in settings.py:
USE_TZ = True
Add a possible fix
Please authorize to post fix