[docs] [issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC

gudge report at bugs.python.org
Thu Dec 19 16:08:07 CET 2013


gudge added the comment:

1) Can I get a list of failures. The summary of test results which I compare on my machine.

2) 

-----------------------------------------------------------------------------------------------------
>>> import ssl
>>> ssl.cert_time_to_seconds("May  9 00:00:00 2007 GMT")
1178649000.0
>>> from datetime import datetime
>>> datetime.utcfromtimestamp(1178668800)
datetime.datetime(2007, 5, 9, 0, 0)
>>> import time
>>> time.gmtime(1178668800)
time.struct_time(tm_year=2007, tm_mon=5, tm_mday=9, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=2, tm_yday=129, tm_isdst=0)
>>> import calender
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'calender'
>>> import callendar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'callendar'
>>> import calendar
>>> calendar.timegm(time.strptime("May 9 00:00:00 2007 GMT", "%b %d %H:%M:%S %Y GMT"))
1178668800
----------------------------------------------------------------------------------------------------

I am running a VM on windows host machine.
In your comment ou have specified:

>>> import ssl
    >>> ssl.cert_time_to_seconds("May  9 00:00:00 2007 GMT")
    1178694000.0

It should be `1178668800`:

But I get also get the same answer with the Python build from latest sources?
Therefore I do not get you?

3)
    3 tests omitted:
        test___all__ test_site test_urllib2net
    348 tests OK.
    3 tests failed:
        test_codecs test_distutils test_ioctl
    2 tests altered the execution environment:
        test___all__ test_site
    33 tests skipped:
        test_bz2 test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
        test_codecmaps_kr test_codecmaps_tw test_curses test_dbm_gnu
        test_dbm_ndbm test_devpoll test_gzip test_idle test_kqueue
        test_lzma test_msilib test_ossaudiodev test_readline test_smtpnet
        test_socketserver test_sqlite test_ssl test_startfile test_tcl
        test_timeout test_tk test_ttk_guionly test_ttk_textonly
        test_urllibnet test_winreg test_winsound test_xmlrpc_net
        test_zipfile64 test_zlib


Are these results fine. These results are with no changes. 
How can I make all tests (skipped and omiited pass)

What about the 3 tests which failed. Are these known failures?

4) 

 Now say I have to pull time again to get the latest code. Does it help
to do a make. Or I will have o do configure again.

5) I had posted a query on core-metorship? No answers? Not that I am entitled to.

Thanks

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19940>
_______________________________________


More information about the docs mailing list