From fe7bb8b8c5c5ef2f1b528395cb8d1a71a96f1a02 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 4 Aug 2016 11:31:42 -0400 Subject: [PATCH] fix 27-day check --- lib/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }