Creates a datetime from a POSIX timestamp.
문법
datetime.fromtimestamp(timestamp)예제
아래 값을 입력하면 예제에 즉시 반영됩니다.
import→ts→dt→fromtimestamp→print→from datetime import datetime
ts = 1704034800.0
dt = datetime.fromtimestamp(ts)
print(dt) # 2024-01-01 00:00:00