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/templatetags | |
| parent | 1cf60ce6017d904024ee132f7edae0b4b821a954 (diff) | |
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/templatetags')
| -rw-r--r-- | django/templatetags/tz.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/templatetags/tz.py b/django/templatetags/tz.py index de0432cd4d..cb7d22e5f2 100644 --- a/django/templatetags/tz.py +++ b/django/templatetags/tz.py @@ -1,4 +1,6 @@ -from datetime import datetime, tzinfo +from datetime import datetime +from datetime import timezone as datetime_timezone +from datetime import tzinfo try: import zoneinfo @@ -57,7 +59,7 @@ def utc(value): """ Convert a datetime to UTC. """ - return do_timezone(value, timezone.utc) + return do_timezone(value, datetime_timezone.utc) @register.filter("timezone") |
