From ec2778b445546f624d3b3a1f2118e751b10bb2e7 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 8 Sep 2013 02:04:31 -0500 Subject: Fixed #17262 -- Refactored tzinfo implementations. This commit deprecates django.utils.tzinfo in favor of the more recent django.utils.timezone which was introduced when Django gained support for time zones. --- docs/ref/utils.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index a093de18b7..59a501cf82 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -927,6 +927,17 @@ For a complete discussion on the usage of the following see the :class:`~datetime.tzinfo` instance that represents UTC. +.. function:: get_fixed_timezone(offset) + + .. versionadded:: 1.7 + + Returns a :class:`~datetime.tzinfo` instance that represents a time zone + with a fixed offset from UTC. + + ``offset`` is a :class:`datetime.timedelta` or an integer number of + minutes. Use positive values for time zones east of UTC and negative + values for west of UTC. + .. function:: get_default_timezone() Returns a :class:`~datetime.tzinfo` instance that represents the @@ -1021,6 +1032,9 @@ For a complete discussion on the usage of the following see the ``django.utils.tzinfo`` ======================= +.. deprecated:: 1.7 + Use :mod:`~django.utils.timezone` instead. + .. module:: django.utils.tzinfo :synopsis: Implementation of ``tzinfo`` classes for use with ``datetime.datetime``. @@ -1028,6 +1042,12 @@ For a complete discussion on the usage of the following see the Fixed offset in minutes east from UTC. + .. deprecated:: 1.7 + Use :func:`~django.utils.timezone.get_fixed_timezone` instead. + .. class:: LocalTimezone Proxy timezone information from time module. + + .. deprecated:: 1.7 + Use :func:`~django.utils.timezone.get_default_timezone` instead. -- cgit v1.3