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

Method timestamp

Lib/_pydatetime.py:2013–2019  ·  view source on GitHub ↗

Return POSIX timestamp as float

(self)

Source from the content-addressed store, hash-verified

2011
2012
2013 def timestamp(self):
2014 "Return POSIX timestamp as float"
2015 if self._tzinfo is None:
2016 s = self._mktime()
2017 return s + self.microsecond / 1e6
2018 else:
2019 return (self - _EPOCH).total_seconds()
2020
2021 def utctimetuple(self):
2022 "Return UTC time tuple compatible with time.gmtime()."

Calls 2

_mktimeMethod · 0.95
total_secondsMethod · 0.80