Closed moltar closed 5 years ago
Could you check again about "Amazon API returns dates as epoch in seconds."
I tried to get portfolio from API. It returned dates as epoch in milliseconds (not seconds)
"creationDate": 1560826309267,
"lastUpdatedDate": 1560826309267,
I found that docs also mentioned about them:
"creationDate": {
"description": "The date the campaign was created as epoch time in milliseconds",
"type": "number"
},
"lastUpdatedDate": {
"description": "The date the campaign was last updated as epoch time in milliseconds",
"type": "number"
},
https://advertising.amazon.com/API/docs/v2/reference/campaigns#CampaignEx
That is an excellent investigative work. Thanks!
Amazon API returns dates as epoch in seconds.
Example:
We need a type that converts this epoch numeric date to a JS
Date
object.There is a good example here, but I think it uses milliseconds.