Skip to content

Commit

Permalink
add just now to relative dates
Browse files Browse the repository at this point in the history
  • Loading branch information
satterly committed Jul 13, 2013
1 parent 313e54f commit c0e11e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions alerta/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def relative_date(from_date, now=None):
days = diff.days

if days == 0:
if secs == 0:
return 'just now'
if secs < 90:
return '{} seconds {}'.format(secs, when)
mins = (secs + 30) / 60
Expand Down

0 comments on commit c0e11e8

Please sign in to comment.