Research Guides
Preserve the Date a Researcher Chose When Reopening a Report
A date chosen in a research form should not become the previous day when the saved report opens elsewhere. Before publishing a report based on a date filter, check whether the form records a calendar date or converts it into an instant.
Decide what the field means
In a fictional review audit, the analyst chooses November 21, 2026 as the first reporting day. That is a calendar date in the report’s agreed time zone. It is not a request to start at midnight UTC unless that is the reporting convention. Record the reporting time zone separately from the filter value.
Trace the value from selection to saved report
For an HTML date input, the HTML Standard’s date control rules define a date value without a time of day; converting that value into a JavaScript Date uses midnight UTC. For example, the calendar value can be stored as 2026-11-21. If code instead displays midnight UTC using Los Angeles local time, the result is November 20 at 4 p.m. That local rendering must not silently replace the calendar date the researcher selected.
Test the result set, not just the label
Use an authorized test report with one item dated November 20 and one dated November 21 in the chosen reporting time zone. Set the lower boundary to November 21, save, and reopen the report in environments with different local time zones. Check that the date shown and the included items stay the same if the report’s time zone is fixed. If the shown date is right but the wrong item is included, inspect how the service applies the reporting boundary separately. See the reporting-day worksheet for checking the boundaries of the data itself.
Copy this review row
Selected date | field meaning | stored value | reporting time zone | viewer time zone | reopened date | items included
Test a boundary day before relying on a date-filtered count. A report can show the right label while querying the wrong interval.