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

Method fromtimestamp

Lib/_pydatetime.py:1016–1021  ·  view source on GitHub ↗

Construct a date from a POSIX timestamp (like time.time()).

(cls, t)

Source from the content-addressed store, hash-verified

1014
1015 @classmethod
1016 def fromtimestamp(cls, t):
1017 "Construct a date from a POSIX timestamp (like time.time())."
1018 if t is None:
1019 raise TypeError("'NoneType' object cannot be interpreted as an integer")
1020 y, m, d, hh, mm, ss, weekday, jday, dst = _time.localtime(t)
1021 return cls(y, m, d)
1022
1023 @classmethod
1024 def today(cls):

Callers 15

Time2InternaldateFunction · 0.45
todayMethod · 0.45
nowMethod · 0.45
formatdateFunction · 0.45
time2isozFunction · 0.45
time2netscapeFunction · 0.45
send_headMethod · 0.45
test_fromtimestampMethod · 0.45
test_todayMethod · 0.45
test_fromtimestampMethod · 0.45

Calls 1

clsClass · 0.50