diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 61a8ab7..680c299 100644
a
|
b
|
class DatabaseOperations(BaseDatabaseOperations):
|
371 | 371 | else: |
372 | 372 | raise ValueError("MySQL backend does not support timezone-aware datetimes when USE_TZ is False.") |
373 | 373 | |
374 | | # MySQL doesn't support microseconds |
375 | | return six.text_type(value.replace(microsecond=0)) |
| 374 | return six.text_type(value) |
376 | 375 | |
377 | 376 | def value_to_db_time(self, value): |
378 | 377 | if value is None: |
… |
… |
class DatabaseOperations(BaseDatabaseOperations):
|
382 | 381 | if timezone.is_aware(value): |
383 | 382 | raise ValueError("MySQL backend does not support timezone-aware times.") |
384 | 383 | |
385 | | # MySQL doesn't support microseconds |
386 | | return six.text_type(value.replace(microsecond=0)) |
387 | | |
388 | | def year_lookup_bounds_for_datetime_field(self, value): |
389 | | # Again, no microseconds |
390 | | first, second = super(DatabaseOperations, self).year_lookup_bounds_for_datetime_field(value) |
391 | | return [first.replace(microsecond=0), second.replace(microsecond=0)] |
| 384 | return six.text_type(value) |
392 | 385 | |
393 | 386 | def max_name_length(self): |
394 | 387 | return 64 |
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index 789c1db..4ad9bac 100644
a
|
b
|
Cache
|
88 | 88 | |
89 | 89 | * ... |
90 | 90 | |
| 91 | Database backends |
| 92 | ^^^^^^^^^^^^^^^^^ |
| 93 | |
| 94 | * When Django saves ``datetime`` values through the MySQL backend, it does no |
| 95 | longer strip microseconds, letting the database decide if it will discard |
| 96 | them or not (MySQL 5.6.4 and up supports fractional seconds depending on the |
| 97 | declaration of the datetime field). |
| 98 | |
91 | 99 | Email |
92 | 100 | ^^^^^ |
93 | 101 | |