Getting sensor history with ORDER_OLDEST_FIRST returns me future dates.
Here the code
var sensorHistoryOptions = { :period => new Time.Duration(25 * Gregorian.SECONDS_PER_HOUR), :order => SensorHistory.ORDER_OLDEST_FIRST }; var sensorHistoryIterator = SensorHistory.getStressHistory(sensorHistoryOptions); var sample = sensorHistoryIterator.next(); Toybox.System.println("NOW:" + Time.now().value()); while (sample != null) { if (sample.data != null) { Toybox.System.println(sample.data + " " + sample.when.value()); } sample = sensorHistoryIterator.next(); }
Output is:
NOW:1684390635
72.000000 1684390635
33.000000 1684390815
57.000000 1684390995
10.000000 1684391175
81.000000 1684392795
57.000000 1684393155
54.000000 1684394055
not setting the order or using ORDER_NEWEST_FIRST works fine.
Can anyone reproduce the issue?