PyDocs

Nav

Data Types

datetime.fromtimestamp

datetime

classmethod of datetime
  • datetime.fromtimestamp(timestamp, tz=None)
Create a datetime from a POSIX timestamp.

The timestamp is a number, e.g. created via time.time(), that is
interpreted as local time.
Changed in 3.3, 3.6, 3.15
  • 3.3: Raise OverflowError instead of ValueError if the timestamp is out of the range of values supported by the platform C localtime() or gmtime() functions. Raise OSError instead of ValueError on localtime() or gmtime() failure.
  • 3.6: fromtimestamp() may return instances with fold set to 1.
  • 3.15: Accepts any real number as timestamp, not only integer or float.
0 Examples
No examples for datetime/datetime.fromtimestamp.
See Also
No see-alsos for datetime/datetime.fromtimestamp
0 Notes
No notes for datetime.fromtimestamp