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

Antoine Pitrou report at bugs.python.org
Tue Dec 10 14:46:54 CET 2013

Antoine Pitrou added the comment:

Indeed the example in the docs is wrong, and so is the current behaviour.

The example shows "round-tripping" using ssl.cert_time_to_seconds() and then time.ctime(), except that it is bogus as it takes a GMT time and ctime() returns a local time ("""Convert a time expressed in seconds since the epoch to a string representing local time""").

Still, we should only fix it in 3.4, as code written for prior versions may rely on the current (bogus) behaviour.

stage:  -> needs patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list