id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 5304 timezone aware datetime causes error when saving on mysql jvisinand@… nobody "It appears that the mysql database engine doesn't support timezone aware datetimes. Although I always save datetime with the timezone set to the TIME_ZONE settings, I have an error. It works on Postgres. Way to reproduce it: - Create a Model with a DateTimeField field - Create an object and set this field to a timezone aware datetime - Save it: {{{ Traceback (most recent call last): File """", line 1, in File ""/Volumes/MacData/Users/juju/mixin/events/models.py"", line 472, in save super(MxEvent, self).save() File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/models/base.py"", line 251, in save ','.join(placeholders)), db_values) File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/backends/util.py"", line 19, in execute return self.cursor.execute(sql, params) File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/MySQLdb/cursors.py"", line 168, in execute if not self._defer_warnings: self._warning_check() File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/MySQLdb/cursors.py"", line 82, in _warning_check warn(w[-1], self.Warning, 3) File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/warnings.py"", line 62, in warn globals) File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/warnings.py"", line 102, in warn_explicit raise message Warning: Out of range value for column 'start_date' at row 1 }}} Work around: Save non timezone aware datetime. " closed Database layer (models, ORM) dev invalid timezone aware datetime causes error when saving on mysql oliver@… Design decision needed 0 0 0 0 0 0