Skip to content

Comments

Fix count_last_minutes midnight wrapping and bloops_per_day timezone#4

Merged
DASPRiD merged 3 commits intomainfrom
copilot/fix-count-last-minutes-bug
Feb 19, 2026
Merged

Fix count_last_minutes midnight wrapping and bloops_per_day timezone#4
DASPRiD merged 3 commits intomainfrom
copilot/fix-count-last-minutes-bug

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

  • Fix count_last_minutes: replace now_minute.wrapping_sub(i) % MINUTES_IN_DAY with (now_minute + MINUTES_IN_DAY - i) % MINUTES_IN_DAY
  • Fix record_bloop: derive local_date from bloop.recorded_at.with_timezone(tz) (same as local_hour) instead of UTC date
  • Add test count_last_minutes_across_midnight: verifies all 3 minutes are counted when window wraps past UTC midnight
  • Add test record_bloop_uses_local_timezone_for_bloops_per_day: verifies bloops_per_day is keyed by local date for non-UTC timezone
  • Fix cargo fmt formatting issues in new tests (multi-line assert_eq!, extra blank line)
  • All 106 tests pass, cargo fmt check passes

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…r bloops_per_day

Co-authored-by: DASPRiD <233300+DASPRiD@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix bugs in count_last_minutes and record_bloop Fix count_last_minutes midnight wrapping and bloops_per_day timezone Feb 19, 2026
Copilot AI requested a review from DASPRiD February 19, 2026 12:35
@DASPRiD DASPRiD marked this pull request as ready for review February 19, 2026 12:36
@DASPRiD
Copy link
Member

DASPRiD commented Feb 19, 2026

@copilot see failing checks.

Co-authored-by: DASPRiD <233300+DASPRiD@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 19, 2026

@copilot see failing checks.

Fixed in 52364d7cargo fmt was failing due to a too-long assert_eq! line (rustfmt wants multi-line format) and an extra blank line before fn dummy_stats. The PR title check is a separate issue with the conventional-commits prefix requirement, which is unrelated to the code changes.

@DASPRiD DASPRiD merged commit da4cd06 into main Feb 19, 2026
4 of 5 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 19, 2026
## [1.10.7](v1.10.6...v1.10.7) (2026-02-19)

### Bug Fixes

* fix count_last_minutes midnight wrapping and bloops_per_day timezone ([#4](#4)) ([da4cd06](da4cd06))
@github-actions
Copy link

🎉 This PR is included in version 1.10.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants