1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-05 04:40:11 +01:00

fix little bug

This commit is contained in:
Thomas Pointhuber 2014-03-15 19:31:34 +01:00
parent 5538c6771a
commit ef2b1b7515

View File

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