MCPcopy Index your code
hub / github.com/python/cpython / fromtimestamp

Method fromtimestamp

Lib/_pydatetime.py:1899–1906  ·  view source on GitHub ↗

Construct a datetime from a POSIX timestamp (like time.time()). A timezone info object may be passed in as well.

(cls, timestamp, tz=None)

Source from the content-addressed store, hash-verified

1897
1898 @classmethod
1899 def fromtimestamp(cls, timestamp, tz=None):
1900 """Construct a datetime from a POSIX timestamp (like time.time()).
1901
1902 A timezone info object may be passed in as well.
1903 """
1904 _check_tzinfo_arg(tz)
1905
1906 return cls._fromtimestamp(timestamp, tz is not None, tz)
1907
1908 @classmethod
1909 def utcfromtimestamp(cls, t):

Callers

nothing calls this directly

Calls 2

_check_tzinfo_argFunction · 0.85
_fromtimestampMethod · 0.80

Tested by

no test coverage detected