MCPcopy Index your code
hub / github.com/RustPython/RustPython / utcfromtimestamp

Method utcfromtimestamp

Lib/_pydatetime.py:1874–1883  ·  view source on GitHub ↗

Construct a naive UTC datetime from a POSIX timestamp.

(cls, t)

Source from the content-addressed store, hash-verified

1872
1873 @classmethod
1874 def utcfromtimestamp(cls, t):
1875 """Construct a naive UTC datetime from a POSIX timestamp."""
1876 import warnings
1877 warnings.warn("datetime.datetime.utcfromtimestamp() is deprecated and scheduled "
1878 "for removal in a future version. Use timezone-aware "
1879 "objects to represent datetimes in UTC: "
1880 "datetime.datetime.fromtimestamp(t, datetime.UTC).",
1881 DeprecationWarning,
1882 stacklevel=2)
1883 return cls._fromtimestamp(t, True, None)
1884
1885 @classmethod
1886 def now(cls, tz=None):

Callers

nothing calls this directly

Calls 2

_fromtimestampMethod · 0.80
warnMethod · 0.45

Tested by

no test coverage detected