Browse Source

Display certificate TTL in days instead of seconds

pull/19/head
Rodolphe Breard 5 years ago
parent
commit
6255587329
  1. 2
      acmed/src/certificate.rs

2
acmed/src/certificate.rs

@ -105,7 +105,7 @@ impl Certificate {
fn is_expiring(&self, cert: &X509Certificate) -> Result<bool, Error> { fn is_expiring(&self, cert: &X509Certificate) -> Result<bool, Error> {
let expires_in = cert.expires_in()?; 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 ?) // TODO: allow a custom duration (using time-parse ?)
// 1814400 is 3 weeks (3 * 7 * 24 * 60 * 60) // 1814400 is 3 weeks (3 * 7 * 24 * 60 * 60)
let renewal_time = Duration::new(1814400, 0); let renewal_time = Duration::new(1814400, 0);

Loading…
Cancel
Save