I’m using a Losant API node to perform a “Data: Timeseries” query. For the query, I am supplying a start-time and an end-time using a Virtual Button for testing:
{
"searchstart": 0,
"searchend": 1571436455
}
Using the above parameters, I get results which suggest that searchstart
and searchend
are being interpreted as seconds-since-epoch rather than milliseconds-since-epoch as stated here:
https://forums.losant.com/t/schema-for-the-body-of-a-time-series-query/1586/4
The time-series query returns the time-range used as:
"end":"2019-10-18T22:24:53.427Z"
"start":"2019-10-18T22:07:35.000Z"
If the value 1571436455
was being interpreted as milliseconds-since-epoch, this would correspond to just a few hours after Jan 1 1970, so we can’t possibly have any data for that time-range.
So, this is phenomena #1 which I don’t understand.
Secondly, if I change the Virtual Button to provide the following values, then I get no results from the time-series even though this query is strictly wider!
{
"searchstart": 0,
"searchend": 1571436455000
}
In this case, the query returns the search-range as:
"end":"2019-10-18T22:27:08.070Z"
"start":"2019-04-21T22:27:08.070Z"
It looks like there is range-dependent casting.