We have a calculation running (see below) that gives us substituted data on some days. The calculation runs every 2 hours but the output timestamp is set to "T". My best guess on why we get substituted values is that TagVal is interpolated and then we can get some difference in values when the next value (after midnight) is abailable. The source data has approx 5 second resolution (no compression).
TagVal('sinusoid', 'T') - TagVal('sinusoid', 'Y')
Source data (midnight values)