Two reports can use the same sales transactions and disagree about yesterday. One groups records by the timestamp stored in a source system; another converts them to the business’s local time first. Transactions near midnight fall into different dates.
I would resolve the business-day rule before adding a new chart. This is a date-boundary problem, not necessarily a missing-data problem. Fixing it requires preserving both what happened and how the business wants to report it.
Choose the event you mean by a sale
An order can have an entered time, payment time, shipment time and posting date. Those events answer different questions. A daily order-intake report should not silently mix order creation with accounting posting.
List the source field, its meaning, whether it includes an offset and whether the value can change later. A date-only accounting field is not an exact timestamp. Do not invent a midnight event and treat it as precise simply to make the data fit a chart.
If systems disagree on definitions, use the business KPI dictionary guide to establish the measure first. Then define the date rule attached to that measure.
Preserve the instant and apply an explicit reporting zone
For actual events, retain enough information to establish the instant consistently. Avoid stripping timezone information from exports or relying on the default timezone of whichever laptop runs the report.
PostgreSQL’s date and time documentation explains its timestamp types and timezone handling. The correct implementation depends on the source data and database; the important design point is to distinguish an instant from an unqualified local clock reading.
Use a named reporting zone such as America/New_York where appropriate, rather than assuming a fixed offset works throughout the year. A Boston business’s calendar day follows local daylight-saving rules, not a permanent offset chosen during setup. Display a clear local-zone label on reports and exports.
Define the boundary, including unusual days
Decide whether the report follows local midnight, a store close or another operating cutoff. State whether the start is inclusive and the end exclusive so a boundary transaction is not counted twice in adjacent periods.
For example, an illustrative operating day might run from one local opening cutoff to the next. Convert those boundaries correctly rather than assuming every local day contains exactly 24 elapsed hours. Daylight-saving transitions can create shorter or longer days.
PostgreSQL documents ambiguous and invalid local timestamps. If a source sends local times without an offset during a repeated hour, the reporting team may not have enough information to reconstruct the instant reliably. Flag that limitation instead of silently claiming certainty.
Test the records near the edge
Build a small reconciliation set containing transactions just before and after the cutoff, a daylight-saving transition, a corrected transaction and a late-arriving record. Write the expected business date for each before testing the transformation.
Compare record identifiers as well as totals. Two opposite errors can cancel numerically while the underlying dates remain wrong. Check that each eligible record belongs to exactly one reporting period under the agreed rule.
Database design and cleanup can address inconsistent timestamp storage. Business reporting and analytics can then apply the rule consistently across dashboards and spreadsheet exports.
Decide whether yesterday can change
Late data and corrections can alter prior periods. Define whether the report restates history, freezes a close or shows both an operational view and a closed view. Add a clear as-of time so readers know which records were available when the report ran.
Do not confuse a late data refresh with a change in business performance. Keep refresh status visible and preserve a short record of transformation changes. When comparing systems, match both the reporting period and the as-of boundary.
The result should be a written business-day specification, a tested set of edge cases and one documented transformation. Contact Us if daily totals keep shifting and your team needs to establish where the disagreement begins.