summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2019-09-06 07:59:06 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-09-10 12:01:00 +0200
commitcb2be9d5d57c34a70f0c549b780183f8c73aec4b (patch)
treef23412a2d6fbce2bac67995bfc07a8595f65594c /django/utils
parent3d716467a9f046c7af4fb62c13e6b975c06c135f (diff)
Refs #29546 -- Removed django.utils.timezone.FixedOffset per deprecation timeline.
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/timezone.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/django/utils/timezone.py b/django/utils/timezone.py
index 4c43377447..a87ec5fc33 100644
--- a/django/utils/timezone.py
+++ b/django/utils/timezone.py
@@ -3,7 +3,6 @@ Timezone-related classes and functions.
"""
import functools
-import warnings
from contextlib import ContextDecorator
from datetime import datetime, timedelta, timezone, tzinfo
@@ -11,7 +10,6 @@ import pytz
from asgiref.local import Local
from django.conf import settings
-from django.utils.deprecation import RemovedInDjango31Warning
__all__ = [
'utc', 'get_fixed_timezone',
@@ -23,40 +21,6 @@ __all__ = [
]
-# UTC and local time zones
-
-ZERO = timedelta(0)
-
-
-class FixedOffset(tzinfo):
- """
- Fixed offset in minutes east from UTC. Taken from Python's docs.
-
- Kept as close as possible to the reference version. __init__ was changed
- to make its arguments optional, according to Python's requirement that
- tzinfo subclasses can be instantiated without arguments.
- """
-
- def __init__(self, offset=None, name=None):
- warnings.warn(
- 'FixedOffset is deprecated in favor of datetime.timezone',
- RemovedInDjango31Warning, stacklevel=2,
- )
- if offset is not None:
- self.__offset = timedelta(minutes=offset)
- if name is not None:
- self.__name = name
-
- def utcoffset(self, dt):
- return self.__offset
-
- def tzname(self, dt):
- return self.__name
-
- def dst(self, dt):
- return ZERO
-
-
# UTC time zone as a tzinfo instance.
utc = pytz.utc