aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/renderer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index 17e0119..b1e64be 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -1,6 +1,6 @@
use actix_web::http::StatusCode;
use chrono::{DateTime, Duration, Utc};
-use chrono_humanize::{Accuracy, HumanTime, Tense};
+use chrono_humanize::HumanTime;
use maud::{html, Markup, PreEscaped, DOCTYPE};
use std::time::SystemTime;
use strum::IntoEnumIterator;
@@ -913,7 +913,7 @@ fn humanize_systemtime(src_time: Option<SystemTime>) -> Option<String> {
src_time
.and_then(|std_time| SystemTime::now().duration_since(std_time).ok())
.and_then(|from_now| Duration::from_std(from_now).ok())
- .map(|duration| HumanTime::from(duration).to_text_en(Accuracy::Rough, Tense::Past))
+ .map(|duration| format!("{}", HumanTime::from(-duration)))
}
/// Renders an error on the webpage