After 16:00 UTC, “today” in CI and “today” locally are different days.
Beijing time is UTC+8, so 16:00 UTC is midnight in Beijing. From midnight to eight in the morning, it is already the next day locally and still the previous day in CI, and any test that fetches data for “today” disagrees during those hours.
On Windows I couldn’t reproduce it with TZ=UTC, so I monkeypatched the date functions and checked CI. When code reads the current time in many places, one always gets missed, so it is better to route all of it through a single function.
Written byShihao Qi