Technical notes on web development, DevOps, and AI integration.
1 article
A date filter test failed every dawn from midnight to seven: two clocks in one test. Fix: derive dates from the database clock, pin midday.
TL;DR: A scheduled test failure came from two clocks: Go on a WIB host and MySQL in UTC, seven hours apart. Around midnight their dates diverged, so Go's yesterday still contained the database's today and assertions failed until morning. The fix uses MySQL's CURDATE as the single witness and pins rows to midday to stay clear of boundary drift.