MCPcopy Index your code
hub / github.com/plotly/plotly.py / _ms_to_datetime_str

Function _ms_to_datetime_str

plotly/shapeannotation.py:25–28  ·  view source on GitHub ↗

Convert milliseconds since epoch back to a datetime string.

(ms)

Source from the content-addressed store, hash-verified

23
24
25def _ms_to_datetime_str(ms):
26 """Convert milliseconds since epoch back to a datetime string."""
27 dt = datetime.datetime.fromtimestamp(ms / 1000, tz=datetime.timezone.utc)
28 return dt.strftime("%Y-%m-%d %H:%M:%S")
29
30
31def _mean(x):

Callers 1

_meanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected