Skip to content

test: build expected advisor and organization dates in UTC - #444

Merged
andrii-bodnar merged 1 commit into
masterfrom
fix/advisors-test-timezone
Nov 18, 2026
Merged

andrii-bodnar merged 1 commit into
masterfrom
fix/advisors-test-timezone

Conversation

@katerina20

Copy link
Copy Markdown
Collaborator

#443 changed DateDeserializer to respect the time zone offset in a timestamp. Before that, it parsed 2026-04-16T12:00:00+00:00 as 12:00 in the JVM's default time zone and ignored the +00:00.

AdvisorsApiTest and OrganizationApiTest were written against that old behavior. Their localDate() helpers still build expected dates in the JVM's default time zone, so 7 tests fail on any machine that isn't set to UTC. CI stays green only because GitHub's runners use UTC.

The fixtures for these tests all use an explicit +00:00 offset, so the expected dates should be interpreted as UTC.

Fix

Four lines: in each test class, the helper uses ZoneId.of("UTC") instead of ZoneId.systemDefault(), and its comment, which still described the old behavior, is corrected. Helper names, imports, fixtures and production code are unchanged.

Testing

Each class run on its own, so that tests which change the JVM's default time zone can't hide a failure:

UTC America/Los_Angeles Asia/Tokyo Asia/Kolkata
AdvisorsApiTest before ✅ 4 fail 4 fail 4 fail
AdvisorsApiTest after 5/5 ✅ 5/5 ✅ 5/5 ✅ 5/5 ✅
OrganizationApiTest before ✅ 3 fail 3 fail 3 fail
OrganizationApiTest after 6/6 ✅ 6/6 ✅ 6/6 ✅ 6/6 ✅

The full suite passes with all 899 tests in both UTC and America/Los_Angeles.

🤖 Generated with Claude Code

The fixtures carry an explicit +00:00 offset, which DateDeserializer
honors since #443. The date helpers still used the JVM default time
zone, matching the old offset-ignoring behavior, so 7 tests failed
outside UTC.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@andrii-bodnar
andrii-bodnar merged commit 4aaffe3 into master Nov 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants