Skip to content

Use hours as unit when finding center to avoid rounding issues - #161

Merged
clackner-gpa merged 1 commit into
developmentfrom
TimeFilterConversionBug
Sep 14, 2026
Merged

clackner-gpa merged 1 commit into
developmentfrom
TimeFilterConversionBug

Conversation

@prestoncraw

@prestoncraw prestoncraw commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Fixes a time-filter issue where changing the start date could shift both time values by 12 hours. The midpoint calculation now adds the half-window in hours to avoid Moment rounding fractional days.

Verified that repeated date changes preserve the end time/start time.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review comments; the calculation preserves time values correctly.

Pull request overview

Fixes time-window midpoint calculations to prevent date/time shifts caused by fractional-day rounding.

Changes:

  • Adds the half-window in hours.
  • Preserves fractional-day precision.
File summaries
File Description
PQBrowser/Scripts/TSX/Components/EventSearch/TimeWindowUtils.tsx Fixes midpoint calculation precision.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@clackner-gpa
clackner-gpa merged commit e137549 into development Sep 14, 2026
2 checks passed
@clackner-gpa
clackner-gpa deleted the TimeFilterConversionBug branch September 14, 2026 17:58
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.

4 participants