def has_expired(self):
        """
        Check whether the certificate has expired.

        :return: :py:const:`True` if the certificate has expired,
            :py:const:`False` otherwise.
        :rtype: :py:class:`bool`
        """
        time_string = _native(self.get_notAfter())
        not_after = datetime.datetime.strptime(time_string, "%Y%m%d%H%M%SZ")

        return datetime.datetime.utcnow() < not_after
dataset/ETHPy150Open pyca/pyopenssl/src/OpenSSL/crypto.py/X509.has_expired/swapped operands of `<`