I'm trying to find the most correct way to determine the amount of seconds since an item was created.
My first approach is to simply diff the Created property with the browser time, e.g.,
moment().diff(moment(item.Created), 'seconds'), this however depends on the browser, and so it can be off with several seconds (saw one over two minutes off).
I don't know any way to query the server for current time, except for the
<updated> tag when querying for XML, e.g., on a smaller object:
_api/Web/CurrentUser?$select=herpaderp (not present for
So beside my hack are there any way to get the server current time?
Or any other way to calculate the time difference?