Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix off-by-one error in Daystamp logic #435

Merged
merged 1 commit into from
Jan 28, 2024
Merged

Conversation

theospears
Copy link
Collaborator

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

@theospears
Copy link
Collaborator Author

theospears commented Jan 28, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @theospears and the rest of your teammates on Graphite Graphite

Base automatically changed from theo-daystamp-offset-unit to master January 28, 2024 22:37
@theospears theospears merged commit a85c6f2 into master Jan 28, 2024
2 checks passed
@theospears theospears deleted the theo-fix-off-by-one branch January 28, 2024 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant