What really happened
Orders are stored in UTC, and the dashboard's "yesterday" meant the UTC day. Customers are on Toronto time, so a 9 pm Tuesday order is 2 am Wednesday in UTC.
A fix from the summer subtracted four hours by hand. Clocks changed in November and Toronto went to five hours behind, so the late-evening hour still landed on Wednesday.
On top of that, the payment provider confirms some orders in a 3 am batch. At 9 am Wednesday, about 140 of Tuesday's 4,100 orders hadn't arrived yet. Tuesday looked finished. It wasn't.
The fix: convert with a real time-zone name (America/Toronto), define the business day once in one model, label a day preliminary until it closes, and recount the last three days every morning.
The lesson: Define the day once. Close it on purpose.
More bugs like this, every episode.
Go deeper
- Episode 1: Revenue dropped 63% overnight. Every test passed.Count against the source.
- Episode 3: We hit 112% of target. Then we checked.Know the grain on both sides.





