Get validity dates from a PEM certificate
openssl x509 -in /etc/ssl/apache/CERT.PEM -noout -text | grep -i not
Not Before: Oct 12 14:55:11 2017 GMT
Not After : Oct 11 14:55:11 2022 GMT
Not Before: Oct 12 14:55:11 2017 GMT
Not After : Oct 11 14:55:11 2022 GMT