MCPcopy Create free account
hub / github.com/ccxt/ccxt / to_datetime

Method to_datetime

python/ccxt/static_dependencies/msgpack/ext.py:154–160  ·  view source on GitHub ↗

Get the timestamp as a UTC datetime. :rtype: `datetime.datetime`

(self)

Source from the content-addressed store, hash-verified

152 return self.seconds * 10**9 + self.nanoseconds
153
154 def to_datetime(self):
155 """Get the timestamp as a UTC datetime.
156
157 :rtype: `datetime.datetime`
158 """
159 utc = datetime.timezone.utc
160 return datetime.datetime.fromtimestamp(0, utc) + datetime.timedelta(seconds=self.to_unix())
161
162 @staticmethod
163 def from_datetime(dt):

Callers 3

_unpackMethod · 0.80
mainFunction · 0.80
rsi.pyFile · 0.80

Calls 1

to_unixMethod · 0.95

Tested by

no test coverage detected