- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Claimed At" attribute in inventory API endpoint
Hello everyone,
I am struggling to understand how to interpret the "Claimed At" attribute that is returned in the "getOrganizationInventory" endpoint.
I guess this is supposed to indicate the date at which the device was claimed, but I don't get which date format it is using.
Below is an extract from the official API documentation.
Does anyone know how to convert this integer (1518365681 in this case) into a date ?
Solved! Go to solution.
- Labels:
-
Dashboard API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's simply a Unix timestamp, based on seconds since Jan 01 1970.
1518365681
Is equivalent to:
02/11/2018 @ 4:14pm (UTC)
(https://www.unixtimestamp.com)
In Python, conversion could like like this
from datetime import datetime
timestamp = 1518365681
dt_object = datetime.fromtimestamp(timestamp)
print(dt_object)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's simply a Unix timestamp, based on seconds since Jan 01 1970.
1518365681
Is equivalent to:
02/11/2018 @ 4:14pm (UTC)
(https://www.unixtimestamp.com)
In Python, conversion could like like this
from datetime import datetime
timestamp = 1518365681
dt_object = datetime.fromtimestamp(timestamp)
print(dt_object)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I knew it had something really simple 😅
Thanks for the quick answer !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shoutout to unixtimestamp.com! I'd be doomed without it.
