mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Closes issue #22791: Improved datetime from timestamp methods documentation.
Original patch by Akira Li.
This commit is contained in:
parent
3de4aae1d0
commit
e2e178e081
3 changed files with 13 additions and 8 deletions
|
@ -1393,7 +1393,7 @@ class datetime(date):
|
|||
|
||||
@classmethod
|
||||
def utcfromtimestamp(cls, t):
|
||||
"Construct a UTC datetime from a POSIX timestamp (like time.time())."
|
||||
"""Construct a naive UTC datetime from a POSIX timestamp."""
|
||||
t, frac = divmod(t, 1.0)
|
||||
us = int(frac * 1e6)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue