From 6255587329718c092e09a89ff47e2b275b45289a Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Wed, 11 Mar 2020 20:21:37 +0100 Subject: [PATCH] Display certificate TTL in days instead of seconds --- acmed/src/certificate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acmed/src/certificate.rs b/acmed/src/certificate.rs index d1e3f5e..d5ca601 100644 --- a/acmed/src/certificate.rs +++ b/acmed/src/certificate.rs @@ -105,7 +105,7 @@ impl Certificate { fn is_expiring(&self, cert: &X509Certificate) -> Result { let expires_in = cert.expires_in()?; - self.debug(&format!("expires in {}s", expires_in.as_secs())); + self.debug(&format!("expires in {} days", expires_in.as_secs() / 86400)); // TODO: allow a custom duration (using time-parse ?) // 1814400 is 3 weeks (3 * 7 * 24 * 60 * 60) let renewal_time = Duration::new(1814400, 0);