Fixed #8637: fixed timeuntil and date values.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8668 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2008-08-28 16:31:50 +00:00
parent 2e7a87c53c
commit 82179ccbbb
1 changed files with 1 additions and 1 deletions

View File

@ -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()