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

Method fromtimestamp

Lib/_pydatetime.py:1025–1030  ·  view source on GitHub ↗

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

(cls, t)

Source from the content-addressed store, hash-verified

1023
1024 @classmethod
1025 def fromtimestamp(cls, t):
1026 "Construct a date from a POSIX timestamp (like time.time())."
1027 if t is None:
1028 raise TypeError("'NoneType' object cannot be interpreted as an integer")
1029 y, m, d, hh, mm, ss, weekday, jday, dst = _time.localtime(t)
1030 return cls(y, m, d)
1031
1032 @classmethod
1033 def today(cls):

Callers 15

file_mtimeFunction · 0.45
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