fix little bug

This commit is contained in:
Thomas Pointhuber 2014-03-15 19:31:34 +01:00
parent 5538c6771a
commit ef2b1b7515
1 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ def index():
# TODO, check if timezone is calculated right # TODO, check if timezone is calculated right
if 'publishedDate' in result: if 'publishedDate' in result:
if result['publishedDate'].date() == datetime.now().date(): if result['publishedDate'] >= datetime.now() - timedelta(days=1):
timedifference = datetime.now() - result['publishedDate'] timedifference = datetime.now() - result['publishedDate']
minutes = int((timedifference.seconds/60)%60) minutes = int((timedifference.seconds/60)%60)
hours = int(timedifference.seconds/60/60) hours = int(timedifference.seconds/60/60)