This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author akira
Recipients akira, christian.heimes, docs@python, gudge, janssen, pitrou
Date 2013-12-10.21:37:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

There is also an issue with the current strptime format [1] (`"%b %d %H:%M:%S %Y GMT"`). It is locale-dependent and it may fail if a non-English locale is in effect. I don't know whether I should open a new issue on this or are you going to fix it too.

`cert_time_to_seconds()` is documented [2] to parse notBefore, notAfter fields from a certificate. As far as I can tell they do not depend on current locale. Thus the following code should not fail:

    >>> timestr = "May  9 00:00:00 2007 GMT"
    >>> import ssl
    >>> ssl.cert_time_to_seconds(timestr)
    >>> import locale
    >>> locale.setlocale(locale.LC_TIME, 'pl_PL.utf8')
    >>> ssl.cert_time_to_seconds(timestr)
    Traceback (most recent call last):
    ValueError: time data 'May  9 00:00:00 2007 GMT' does not match format '%b %d %H:%M:%S %Y GMT'

Date User Action Args
2013-12-10 21:37:28akirasetrecipients: + akira, janssen, pitrou, christian.heimes, docs@python, gudge
2013-12-10 21:37:28akirasetmessageid: <>
2013-12-10 21:37:28akiralinkissue19940 messages
2013-12-10 21:37:28akiracreate