Running 8.1.33
I am retrieving multiple "windows" of data (where the interesting data is), but for some odd reason, each dataset[-1] is HOURS outside of the limits set in the function call. Here is the function call, followed by my diagnostic code.
dsRaw = system.dataset.toPyDataSet(
system.tag.queryTagHistory(
paths = tags
,startDate = start
,endDate = end
,columnNames = names
,noInterpolation = True
,ignoreBadQuality = True
)
)
if verbose:
verboseresult = ["start:{0}".format(start),"end:{0}".format(end),"first:{0}".format(dsRaw[0][0]),"last:{0}".format(dsRaw[-1][0])]
Statistics.Util.logger("pullCleanHistory() raw results:\n{0}".format("\n".join([3*" " + v for v in verboseresult])))
And here are the results of that diagnostic code:
pullCleanHistory() raw results:
start:Tue Jul 01 08:40:58 EDT 2025
end:Tue Jul 01 08:41:24 EDT 2025
first:Tue Jul 01 08:40:58 EDT 2025
last:Tue Jul 01 13:04:10 EDT 2025pullCleanHistory() raw results:
start:Tue Jul 01 08:42:24 EDT 2025
end:Tue Jul 01 08:42:49 EDT 2025
first:Tue Jul 01 08:42:24 EDT 2025
last:Tue Jul 01 13:04:10 EDT 2025pullCleanHistory() raw results:
start:Tue Jul 01 08:43:37 EDT 2025
end:Tue Jul 01 08:44:02 EDT 2025
first:Tue Jul 01 08:43:37 EDT 2025
last:Tue Jul 01 13:04:10 EDT 2025...etc
While I am showing the first and last data points in the returned dataset, I will note that only the very last data point is outside the limits. I find it odd the same timestamp is returned for all the windows. I hope someone can point me at what I am doing wrong here.
I could perform a check of the last row and just delete it if (when) it is out of bounds, but I'd rather get the return correct than hack the results...if possible. Not like I've never hacked stuff before.