Tidy up 'last_checked' date handling

This commit is contained in:
Leigh Morresi
2021-01-29 14:45:12 +01:00
parent 04c8ea7960
commit abef169382
2 changed files with 3 additions and 4 deletions

View File

@@ -57,7 +57,7 @@ def _jinja2_filter_datetime(watch_obj, format="%Y-%m-%d %H:%M:%S"):
if watch_obj['last_checked'] == 0:
return 'Not yet'
return datetime.datetime.utcfromtimestamp(int(watch_obj['last_checked'])).strftime(format)
return timeago.format(int(watch_obj['last_checked']), time.time())
# @app.context_processor