]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-31327: Update time documentation to reflect possible errors (GH-31460)
authorslateny <46876382+slateny@users.noreply.github.com>
Fri, 11 Mar 2022 19:05:51 +0000 (11:05 -0800)
committerGitHub <noreply@github.com>
Fri, 11 Mar 2022 19:05:51 +0000 (11:05 -0800)
commitc83fc9c02c9846ec3a2d0123999c98e02f00b3f5
tree8e15cfc44f9e8848b3e123bc0e20026ffcaa8ebb
parent6f3b9e2243d8c5b6cf1be988eb5d2bd3da65a422
bpo-31327: Update time documentation to reflect possible errors (GH-31460)

As per the comments, this mirrors the [datetime documentation](https://docs.python.org/3/library/datetime.html#datetime.datetime.fromtimestamp).

```
>>> import time
>>> time.localtime(999999999999999999999)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: timestamp out of range for platform time_t
>>> time.localtime(-3600)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
```
Doc/library/time.rst