summaryrefslogtreecommitdiff
path: root/django/core/files/storage/filesystem.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/files/storage/filesystem.py')
-rw-r--r--django/core/files/storage/filesystem.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/files/storage/filesystem.py b/django/core/files/storage/filesystem.py
index 54c31e536a..428ae61b40 100644
--- a/django/core/files/storage/filesystem.py
+++ b/django/core/files/storage/filesystem.py
@@ -1,5 +1,5 @@
import os
-from datetime import datetime, timezone
+from datetime import UTC, datetime
from urllib.parse import urljoin
from django.conf import settings
@@ -215,7 +215,7 @@ class FileSystemStorage(Storage, StorageSettingsMixin):
If timezone support is enabled, make an aware datetime object in UTC;
otherwise make a naive one in the local timezone.
"""
- tz = timezone.utc if settings.USE_TZ else None
+ tz = UTC if settings.USE_TZ else None
return datetime.fromtimestamp(ts, tz=tz)
def get_accessed_time(self, name):