summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorCarlton Gibson <carlton.gibson@noumenal.es>2022-03-23 12:15:36 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-03-24 06:29:50 +0100
commitbb61f0186d5c490caa44f3e3672d81e14414d33c (patch)
tree71e682d415e4640fd1e950af0e4921b2af57ea60 /django/http
parent1cf60ce6017d904024ee132f7edae0b4b821a954 (diff)
downloaddjango-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/http')
-rw-r--r--django/http/response.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/http/response.py b/django/http/response.py
index 801a0c0640..62b8b1c087 100644
--- a/django/http/response.py
+++ b/django/http/response.py
@@ -236,8 +236,8 @@ class HttpResponseBase:
if expires is not None:
if isinstance(expires, datetime.datetime):
if timezone.is_naive(expires):
- expires = timezone.make_aware(expires, timezone.utc)
- delta = expires - datetime.datetime.now(tz=timezone.utc)
+ expires = timezone.make_aware(expires, datetime.timezone.utc)
+ delta = expires - datetime.datetime.now(tz=datetime.timezone.utc)
# Add one second so the date matches exactly (a fraction of
# time gets lost between converting to a timedelta and
# then the date string).