web: fix age display when less than 1 minute
This commit is contained in:
parent
ac0ce29c76
commit
3edf9fdb5d
@ -136,7 +136,7 @@ fn human_age(timestamp: i64) -> String {
|
||||
.with_timezone(&Local);
|
||||
let age = now - ts;
|
||||
let datetime = if age < Duration::minutes(1) {
|
||||
format!("{} min. ago", age.num_seconds())
|
||||
format!("{} secs. ago", age.num_seconds())
|
||||
} else if age < Duration::hours(1) {
|
||||
format!("{} min. ago", age.num_minutes())
|
||||
} else if ts.date_naive() == now.date_naive() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user