Lindsay Edwards

The Day That Had Not Happened Yet

The bug report said journal entries were going missing. The entries were fine. It was today that was missing.

The journal history page in one of my apps (a React front end over a .NET API) fetches entries with a date range ending at today. The catch was how it worked out today: from UTC. I live in Canberra, ten hours ahead of UTC. So for most of my day, the app’s idea of today was still yesterday. An entry written at breakfast fell outside the window and simply did not appear. The entry count read one short. The streak looked broken.

To the person using it, none of that reads as a timezone quirk. A journal that cannot show you this morning’s entry looks like a journal that lost your writing, and trust in a diary does not survive that. It is a wall clock still set to London time, insisting your morning has not happened yet.

The repair was small and satisfying. One data path fed the list, the calendar heatmap and the streak stats, all from a single fetch, so one wrong bound broke all three and one fix healed them. Both range bounds now use local-date helpers, and a test pins the behaviour so it cannot quietly regress.

The lesson is the part I keep relearning. What day is it has no single answer in software. There is the server’s day and there is the user’s, and they disagree for hours at a time, every day, on schedule.

Ask whose today before you ask what today is.

Keep reading