Previously the daystamp logic was treating events which fell exactly on the cut-off point as being part of the previous day. In fact they should be treated as part of the next day. This lead to Apple Health metrics being attributed to the wrong day.
Testing:
Wrote unit test for this case
With a stacked PR verified that healthkit metrics report correctly
Previously the daystamp logic was treating events which fell exactly on the cut-off point as being part of the previous day. In fact they should be treated as part of the next day. This lead to Apple Health metrics being attributed to the wrong day.
Testing: