-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: DB
-
None
The /reading API using readingType=Difference has a built-in time tolerance of 1 year. The hour-aggregate caching process uses a tolerance of 3 months. This can lead to different results. For example, imagine a datum stream like the following:
Time | Reading |
---|---|
2022-10-01 22:01 | 1 |
2023-02-06 10:01 | 2 |
2023-02-06 10:31 | 3 |
2023-02-06 11:01 | 4 |
Expected hour aggregate data:
Time | Reading | Description |
---|---|---|
2023-02-06 10:00 | 2 | 3 - 1 |
Actual hour aggregate data:
Time | Reading | Description |
---|---|---|
2023-02-06 10:00 | 1 | 3 - 2 |
The hour aggregate caching process should use the same 1 year tolerance as the /reading API for consistent results.