To check a certificate of an host:
openssl s_client -servername your.domain -connect your.domain:443 2>&- | openssl x509 -enddate -noout | sed 's/^notAfter=//g'
To check a certificate file:
openssl x509 -noout -enddate -in your.crt | sed 's/^notAfter=//g'