summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-08-19 14:47:06 -0400
committerTim Graham <timograham@gmail.com>2016-08-19 14:47:38 -0400
commit33783a9e06aa8edfc4842ae5d0f2518a9e7c1c23 (patch)
treeae3daf6ca1f5ba5b3a84d84253e8c06d7eb14b6c
parente5103de2d1a461544b73542df3ed0ad71a73dc21 (diff)
[1.10.x] Fixed #26571 -- Corrected recommendation for converting timestamps to tz-aware datetimes.
Backport of d60386d0f5333c7fef4c5906a3358b00cf9de3bf from master
-rw-r--r--docs/topics/i18n/timezones.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/docs/topics/i18n/timezones.txt b/docs/topics/i18n/timezones.txt
index e9abc22f59..8392d0c09f 100644
--- a/docs/topics/i18n/timezones.txt
+++ b/docs/topics/i18n/timezones.txt
@@ -151,10 +151,8 @@ used.
backwards-compatibility with applications that still rely on local time.
However, :ref:`as explained above <naive-datetime-objects>`, this isn't
entirely reliable, and you should always work with aware datetimes in UTC
- in your own code. For instance, use
- :meth:`~datetime.datetime.utcfromtimestamp` instead of
- :meth:`~datetime.datetime.fromtimestamp` -- and don't forget to set
- ``tzinfo`` to :data:`~django.utils.timezone.utc`.
+ in your own code. For instance, use :meth:`~datetime.datetime.fromtimestamp`
+ and set the ``tz`` parameter to :data:`~django.utils.timezone.utc`.
Selecting the current time zone
-------------------------------