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

Method utcfromtimestamp

Lib/_pydatetime.py:1909–1918  ·  view source on GitHub ↗

Construct a naive UTC datetime from a POSIX timestamp.

(cls, t)

Source from the content-addressed store, hash-verified

1907
1908 @classmethod
1909 def utcfromtimestamp(cls, t):
1910 """Construct a naive UTC datetime from a POSIX timestamp."""
1911 import warnings
1912 warnings.warn("datetime.datetime.utcfromtimestamp() is deprecated and scheduled "
1913 "for removal in a future version. Use timezone-aware "
1914 "objects to represent datetimes in UTC: "
1915 "datetime.datetime.fromtimestamp(t, datetime.UTC).",
1916 DeprecationWarning,
1917 stacklevel=2)
1918 return cls._fromtimestamp(t, True, None)
1919
1920 @classmethod
1921 def now(cls, tz=None):

Callers

nothing calls this directly

Calls 2

_fromtimestampMethod · 0.80
warnMethod · 0.45

Tested by

no test coverage detected