The docs should mention, that MySql doesn't support microseconds
|Reported by:||jammon||Owned by:||Dan Poirier|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
MySQL doesn't store the microsecond part of a TimeField or DateTimeField, which is accounted for in the code (in django/db/backends/mysql/base.py). But the documentation doesn't mention this limitation.
Suggestion: Add this sentence to /en/dev/ref/databases -> MySQL Notes -> Notes on specific fields -> DateTime fields:
MySQL does not support storing the microsecond part of a TimeField or DateTimeField,
so the microsecond part of the data is truncated (set to zero).
(It cost me quite some time to find out, why the integration tests failed on the staging server. I couldn't believe, that MySQL has such a limitation. See the bug report from Feb 2005 (!) http://bugs.mysql.com/bug.php?id=8523).
Change History (8)
comment:1 Changed 5 years ago by
|Patch needs improvement:||unset|
comment:2 Changed 5 years ago by
|Owner:||changed from nobody to Aymeric Augustin|
|Status:||new → assigned|
comment:3 Changed 5 years ago by
|Owner:||changed from Aymeric Augustin to nobody|
|Status:||assigned → new|
|Triage Stage:||Unreviewed → Accepted|