Kaydet (Commit) 348c89cb authored tarafından Tim Graham's avatar Tim Graham

Fixed #19312 -- Documented MySQL TIMESTAMP columns cannot be used with USE_TZ=True.

üst 60428ed5
......@@ -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()``
-------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment