Timeseries query gives fewer results for a strictly-wider time range

Thank you very much. That answers most of my questions.

The reason I chose the Losant API node is because it allows me to specify the start and end-time explicitly; the time-series node only seems to give me the ability to query between some time in the past to time-now.

I should point out that neither the documentation, or the additional details here, say anything about the start being interpreted as current-time for value 0:

This sounds like a dangerous behavior, since I would assume that most users looking to search “all data” would choose 0 as the search-start point, unless they know of this behavior.

For my application, starting at 1 instead of 0 should suffice. I will test with this.

Regarding the milliseconds vs. seconds issue: the value you’ve pasted into that box appears to be a time-stamp in milliseconds since epoch. However, the start-time value in your example is a factor of 1000 lower.

So it looks like you’re putting a value of seconds-since-epoch into the Losant API node, but you’re putting a different value in that Javascript time-converter tool. If you paste your original value (1571436455) into a converter which does not perform any casting (and which treats the values as milliseconds), then you will see a date on Jan 1 1970.

The critical thing is to look at the “Supports Unix timestamps in seconds, milliseconds…” note under that input-box. This tells me that the input-box is interpreting the value differently depending on its size, so it’s tricky to use for comparison purposes.

I’ve been using this page, to ensure that the value is interpreted as milliseconds-since-epoch:
https://currentmillis.com

I don’t completely understand this wording:

End: End of range in milliseconds since Epoch. 0 or blank means current time, and negative values are milliseconds into the past from now. End can also be an Epoch timestamp.

This sounds like “Epoch timestamp” is different from “End of range in milliseconds since Epoch”. Does this mean that “end” can be interpreted as either seconds-since-Epoch or milliseconds-since-Epoch?

1 Like