Closes issue #22791: Improved datetime from timestamp methods documentation.

Original patch by Akira Li.
This commit is contained in:
Alexander Belopolsky 2015-03-01 14:52:07 -05:00
parent 3de4aae1d0
commit e2e178e081
3 changed files with 13 additions and 8 deletions

View file

@ -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)