From 3a540cb3999a60bbe98cc6da7e4b0313d2339af4 Mon Sep 17 00:00:00 2001 From: Dian M Fay Date: Sun, 23 May 2021 19:28:42 -0400 Subject: [PATCH] drop minimum last_run resolution to minutes --- src/interface.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/interface.rs b/src/interface.rs index 78dc2715..71f16979 100644 --- a/src/interface.rs +++ b/src/interface.rs @@ -562,10 +562,10 @@ impl<'a> Interface<'a> { if command.last_run.is_some() { let duration = &format_duration( - Duration::seconds( + Duration::minutes( Utc::now() .signed_duration_since(Utc.timestamp(command.last_run.unwrap(), 0)) - .num_seconds(), + .num_minutes(), ) .to_std() .unwrap(), @@ -584,8 +584,7 @@ impl<'a> Interface<'a> { .replace("hour", "h") .replace("minutes", "m") .replace("minute", "m") - .replace("seconds", "s") - .replace("second", "s") + .replace("0s", "< 1m") .to_string() }) .collect::>()