Using openssl to find out certificate expiration date
The following command will display the certificate chain as well as the expiration date for the certificate.
openssl s_client -connect myserver.mydomain.com:443 -showcerts | openssl x509 -noout -dates -fingerprint