Skip to content

fix: include the whole "to" day in dashboard, reports and timelines - #352

Merged
Martin-1997 merged 1 commit into
mtierltd:masterfrom
bfs2021:fix/20261121-include-to-day
Nov 22, 2026
Merged

Martin-1997 merged 1 commit into
mtierltd:masterfrom
bfs2021:fix/20261121-include-to-day

Conversation

@bfs2021

@bfs2021 bfs2021 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Problem

In Dashboard, Reports and Timelines, a date picked in the range picker as the to bound is sent as that day at 00:00, so entries from the selected end day itself are excluded from the results. The quick-range presets are unaffected because dateRangePresets.js already uses endOfDay() for their to bound.

Repro: pick 17 November as "to" in Reports → the request sends to = 17 November, 00:00 and any entry recorded during 17 November is missing.

Root cause

DashboardView.vue, ReportsView.vue and TimelinesView.vue send the raw picker values:

from: Math.floor(this.rangeFrom.getTime() / 1000),
to: Math.floor(this.rangeTo.getTime() / 1000),

The Timer view had the same problem and was already fixed by querying whole days (#308, commit 1a6502b) by wrapping the bounds with startOfDay() / endOfDay(). These three views never received that treatment.

Fix

Mirror the Timer view fix in the three affected views: wrap rangeFrom with startOfDay() and rangeTo with endOfDay() before converting to seconds, reusing the existing helpers from dateRangePresets.js.

Fixes #323 (part 2 of the proposed fix; the timeline period formatting issue is untouched)

Testing

  • Repro script (Node, no new repo dependencies) importing the real dateRangePresets.js: an entry recorded at 12:00 local on the picked "to" day is excluded with the current raw getTime() bound (red), and included with the endOfDay() bound (green).
  • git diff review: 3 views x (import + wrap), matching the pattern already shipped in TimerView.vue lines 349-350.

@Martin-1997
Martin-1997 merged commit cc3ad37 into mtierltd:master Nov 22, 2026
20 checks passed
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.

Timelines show the wrong period (formatted in UTC), and the "to" date is excluded from Reports, Timelines and Dashboard

2 participants