diff options
| author | Tim Graham <timograham@gmail.com> | 2014-08-26 14:11:35 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-08-26 14:11:35 -0400 |
| commit | 348c89cbfbe3b9be6e759d8d5696d4fde1827d9b (patch) | |
| tree | 806ae7186f19492c9b40ecd940469f4067fdab86 /docs | |
| parent | 60428ed5db76f509f4a0eb737d96b4f0ae6b0ad5 (diff) | |
Fixed #19312 -- Documented MySQL TIMESTAMP columns cannot be used with USE_TZ=True.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/databases.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index 4426e28c75..ca909fcd04 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -500,6 +500,15 @@ respectively, a ``ValueError`` is raised rather than truncating data. MySQL does not store fractions of seconds. Fractions of seconds are truncated to zero when the time is stored. +``TIMESTAMP`` columns +~~~~~~~~~~~~~~~~~~~~~ + +If you are using a legacy database that contains ``TIMESTAMP`` columns, you must +set :setting:`USE_TZ = False <USE_TZ>` to avoid data corruption. +:djadmin:`inspectdb` maps these columns to +:class:`~django.db.models.DateTimeField` and if you enable timezone support, +both MySQL and Django will attempt to convert the values from UTC to local time. + Row locking with ``QuerySet.select_for_update()`` ------------------------------------------------- |
