diff options
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/timezone.py | 36 |
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 |
