fix 27-day check

This commit is contained in:
AJ ONeal 2016-08-04 11:31:42 -04:00
parent 015259c996
commit fe7bb8b8c5
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}