Browse Source

fix little bug

Thomas Pointhuber 11 years ago
parent
commit
ef2b1b7515
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      searx/webapp.py

+ 2
- 2
searx/webapp.py View File

159
 
159
 
160
         # TODO, check if timezone is calculated right
160
         # TODO, check if timezone is calculated right
161
         if 'publishedDate' in result:
161
         if 'publishedDate' in result:
162
-            if result['publishedDate'].date() == datetime.now().date():
163
-                timedifference = datetime.now()-result['publishedDate']
162
+            if result['publishedDate'] >= datetime.now() - timedelta(days=1):
163
+                timedifference = datetime.now() - result['publishedDate']
164
                 minutes = int((timedifference.seconds/60)%60)
164
                 minutes = int((timedifference.seconds/60)%60)
165
                 hours = int(timedifference.seconds/60/60)
165
                 hours = int(timedifference.seconds/60/60)
166
                 if hours == 0:
166
                 if hours == 0: