diff options
author | Carlton Gibson <carlton.gibson@noumenal.es> | 2022-03-23 12:15:36 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-03-24 06:29:50 +0100 |
commit | bb61f0186d5c490caa44f3e3672d81e14414d33c (patch) | |
tree | 71e682d415e4640fd1e950af0e4921b2af57ea60 /django/utils/dateparse.py | |
parent | 1cf60ce6017d904024ee132f7edae0b4b821a954 (diff) | |
download | django-bb61f0186d5c490caa44f3e3672d81e14414d33c.tar.gz |
Refs #32365 -- Removed internal uses of utils.timezone.utc alias.
Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
Diffstat (limited to 'django/utils/dateparse.py')
-rw-r--r-- | django/utils/dateparse.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/dateparse.py b/django/utils/dateparse.py index 2e6a260a4f..08651f57ad 100644 --- a/django/utils/dateparse.py +++ b/django/utils/dateparse.py @@ -8,7 +8,7 @@ import datetime from django.utils.regex_helper import _lazy_re_compile -from django.utils.timezone import get_fixed_timezone, utc +from django.utils.timezone import get_fixed_timezone date_re = _lazy_re_compile(r"(?P<year>\d{4})-(?P<month>\d{1,2})-(?P<day>\d{1,2})$") @@ -118,7 +118,7 @@ def parse_datetime(value): kw["microsecond"] = kw["microsecond"] and kw["microsecond"].ljust(6, "0") tzinfo = kw.pop("tzinfo") if tzinfo == "Z": - tzinfo = utc + tzinfo = datetime.timezone.utc elif tzinfo is not None: offset_mins = int(tzinfo[-2:]) if len(tzinfo) > 3 else 0 offset = 60 * int(tzinfo[1:3]) + offset_mins |