convert timestamp object to date python code example
Example 1: timestamp to date python
from datetime import datetime
timestamp = 1586507536367
dt_object = datetime.fromtimestamp(timestamp)
Example 2: from json timestamp to date python
for location in locations:
print(datetime.datetime.fromtimestamp(
int(location.get("timestampMs"))/1000
).strftime("%Y-%m-%dT%H:%M:%SZ"))