Skip to content

Commit 0d555e4

Browse files
committed
Replace deprecated utcfromtimestamp
1 parent 0427f74 commit 0d555e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/ssl.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ Certificate handling
388388
>>> timestamp = ssl.cert_time_to_seconds("Jan 5 09:34:43 2018 GMT")
389389
>>> timestamp # doctest: +SKIP
390390
1515144883
391-
>>> print(dt.datetime.utcfromtimestamp(timestamp)) # doctest: +SKIP
392-
2018-01-05 09:34:43
391+
>>> print(dt.datetime.fromtimestamp(timestamp, dt.UTC)) # doctest: +SKIP
392+
2018-01-05 09:34:43+00:00
393393

394394
"notBefore" or "notAfter" dates must use GMT (:rfc:`5280`).
395395

0 commit comments

Comments
 (0)