2591 2 2
|ctmorrison private msg quote post Address this user|
plus 1 0
|I'm using NetIO (smartphone app) to provide a means for users to see the last data point for various streams. We post data every minute. Unfortunately, I don't know if the data being shown is current or old data--which could happen if one of our devices goes offline. Users can be misled if they're seeing data, but don't know that it's "old".
Is there a way to get the (local) date & time stamp for the last data point being provided via the API call requesting the "last_value" data point? I only see the timestamp being returned in epoch milliseconds. Alternatively, is there a simple way to create a point stream that holds the date-time of the last point in a different stream? I could then request this value and display it.
|Post 1 IP flag post|
|MikeMills private msg quote post Address this user|
plus 1 0
|We only return epoch millis. You're phone app programming language should have an api that allows you to convert/format it into your local time with the TimeZone of the user's phone.
Yes, create a derived point stream (value type DATE) and derived from the source stream and set the value to one of these:
SAMPLE_TIME: The time of the regular stream sample being calculated in epoch Milliseconds.
SAMPLE_SDTIME: The start date time of the interval stream interval being calculated in epoch Milliseconds.
SAMPLE_EDTIME: The end date time of the interval stream interval being calculated in epoch Milliseconds.
It will hold the epoch millis of the last sample time.
|Post 2 IP flag post|