mirror of
https://github.com/django/django.git
synced 2025-06-06 20:19:13 +00:00
ticket #34699. fixed documentation spel chek error. Reformatted example to be inside warning block.
This commit is contained in:
parent
99446762fc
commit
a603dbabea
@ -660,17 +660,15 @@ Usage example:
|
|||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
Trunc functions, at the database level, return a timezone naive value which
|
``Trunc`` functions, at the database level, return a timezone naive value
|
||||||
is converted to a timezone aware value by the ORM. When you use a Trunc
|
which is converted to a timezone aware value by the ORM. When you use a
|
||||||
function in a filter you will need to remember that it is a timezone naive
|
``Trunc`` function in a filter you will need to remember that it is a
|
||||||
value. This can lead to unexpected results if you are using timezones other
|
timezone naive value. This can lead to unexpected results if you are using
|
||||||
than UTC. Django will store date/time values in the database in the UTC
|
timezones other than UTC. Django will store date/time values in the
|
||||||
timezone. The following example demonstrates what happens when using the
|
database in the UTC timezone. The following example demonstrates what
|
||||||
timezone "Europe/Berlin" and how to adjust for this:
|
happens when using the timezone "Europe/Berlin" and how to adjust for this:
|
||||||
|
|
||||||
Filter example using the "Europe/Berlin" timezone.:
|
.. code-block:: pycon
|
||||||
|
|
||||||
.. code-block:: pycon
|
|
||||||
|
|
||||||
>>> from django.utils import timezone
|
>>> from django.utils import timezone
|
||||||
>>> from datetime import datetime
|
>>> from datetime import datetime
|
||||||
|
Loading…
x
Reference in New Issue
Block a user