Python requests timestamp format "timestamp": "1642696349592", what format is this timestamp?
Hello in requests i have a json payload with a timestamp but i cant find out what the timestamp format is, so i don't know how to anwser this request/ make it work.
SO can somebody tell me what the "timestamp" format is? Here is the json payload:
json = {
"pageApiId": "200641",
"clientDetails": [],
"country": "US",
"userAction": "",
"source": "PageView",
"clientTelemetryData": {
"category": "PageView",
"pageName": "200641",
"eventInfo": {
"timestamp": "1642696349592",
"enforcementSessionToken": "null",
"appVersion": "null",
"networkType": "null"
}
},
}
Solution 1:
Seems like a unix timestamp in milliseconds. You can convert that to a human-readable timestamp like
datetime.fromtimestamp(1642696349.592)
So basically divide it by 1000 to get seconds.