mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 11:48:24 +00:00
Six tests failed on any machine outside UTC, by exactly that machine's offset: QueryParserTest sinceDate, sinceDateYearOnly, combinedQuery QuerySerializerTest sinceDate, untilDate, combinedQuery They hardcoded 1735689600L -- 2025-01-01 midnight *UTC* -- but the parser now returns the reader's own midnight, and the serializer formats through `DateUtils.localDay`. In America/New_York the parser answered 1735707600 and the serializer rendered "2024-12-31", both correct. The production code is right; the assertions were left behind when the bound became local. The same file already had it right further down, where the newer cases assert `LocalClock.startOfDay(SearchDate(...))` under a comment explaining that a bound is the reader's midnight and not UTC's. These six now say the same thing, so they state the intended behaviour rather than the behaviour of a UTC build machine. `timestampToDate2025` keeps its UTC literal deliberately: `timestampToDate` is plain epoch arithmetic in `DateUtils`, not the local formatter `serialize` uses. Changing it would have broken a passing test -- the two paths in `QuerySerializer` genuinely differ. Verified green in America/New_York, UTC, Pacific/Auckland and Asia/Kolkata -- 37 + 19 tests, zero failures in each. Full quartz, commons and amethyst suites pass locally, which they did not before this. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wwk8tDEaEvsNoGbtrjZavz