summaryrefslogtreecommitdiff
path: root/django/utils/timesince.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/timesince.py')
-rw-r--r--django/utils/timesince.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/timesince.py b/django/utils/timesince.py
index 8a8ffb8151..3a0d4afb1a 100644
--- a/django/utils/timesince.py
+++ b/django/utils/timesince.py
@@ -2,7 +2,7 @@ import calendar
import datetime
from django.utils.html import avoid_wrapping
-from django.utils.timezone import is_aware, utc
+from django.utils.timezone import is_aware
from django.utils.translation import gettext, ngettext_lazy
TIME_STRINGS = {
@@ -54,7 +54,7 @@ def timesince(d, now=None, reversed=False, time_strings=None, depth=2):
if now and not isinstance(now, datetime.datetime):
now = datetime.datetime(now.year, now.month, now.day)
- now = now or datetime.datetime.now(utc if is_aware(d) else None)
+ now = now or datetime.datetime.now(datetime.timezone.utc if is_aware(d) else None)
if reversed:
d, now = now, d