2025-12-24//NONSENSE
A Christmas Debug Story
December 24th. 6:47 PM. The family is arriving. The turkey is in the oven. My phone buzzes.
"Production is showing wrong dates on all invoices generated today."
Of course it is.
I open my laptop "just for five minutes." My wife gives me The Look. You know The Look. The one that says "if you spend Christmas Eve debugging I will tell your mother what you ACTUALLY do for a living."
I check the logs. All invoices generated after 3 PM are showing December 25th instead of December 24th. Customers are confused. The accounting team is panicking.
My first thought: this is a timezone issue.
It's ALWAYS a timezone issue.
Our server is in UTC. Brazil is UTC-3. At 3 PM Brasilia time it becomes midnight UTC, which means... December 25th. And our date formatting function was using the server timezone instead of the client timezone because someone (me, six months ago) wrote new Date() instead of using our timezone utility.
The fix is one line. ONE LINE. I deploy it, verify, close the laptop.
Total time: 22 minutes. But those 22 minutes contained a lifetime of emotions. Denial (it can't be a timezone bug, we fixed those). Anger (WHY IS TIME SO HARD). Bargaining (maybe I can just change the server clock). Depression (I am debugging on Christmas Eve). Acceptance (it's always a timezone issue).
The turkey was fine. My wife forgave me. The invoices are correct.
Merry Christmas. May your dates always be timezone-aware.