diff --git a/lib/core.js b/lib/core.js index aa2b4b5..f3be4fb 100644 --- a/lib/core.js +++ b/lib/core.js @@ -352,7 +352,7 @@ function getOrCreateDomainCertificate(args, defaults, handlers) { // no certs, seems like a good time to get some return getCertificateAsync(args, defaults, handlers); } - else if (certs.issuedAt > (27 * 24 * 60 * 60 * 1000)) { + else if ((Date.now() - certs.issuedAt) > (27 * 24 * 60 * 60 * 1000)) { // cert is at least 27 days old we can renew that return getCertificateAsync(args, defaults, handlers); }