diff --git a/django/utils/timesince.py b/django/utils/timesince.py index 1ce3550580..1142e00d29 100644 --- a/django/utils/timesince.py +++ b/django/utils/timesince.py @@ -60,7 +60,7 @@ def timeuntil(d, now=None): the given time. """ if not now: - if d.tzinfo: + if getattr(d, 'tzinfo', None): now = datetime.datetime.now(LocalTimezone(d)) else: now = datetime.datetime.now()