fix: use explicit America/Chicago timezone for freeze/thaw scheduling #45

Merged
cal merged 2 commits from fix/utc-timezone-scheduling into next-release 2026-02-22 22:16:55 +00:00
Owner

Summary

  • Adds utils/timezone.py with centralized Chicago timezone helpers (now_chicago(), to_chicago(), to_discord_timestamp(), etc.)
  • Fixes tasks/transaction_freeze.py scheduling to use now_chicago() instead of naive datetime.now(), ensuring freeze/thaw triggers at correct Chicago wall-clock times regardless of container timezone
  • Fixes utils/logging.py JSON timestamp to use datetime.now(UTC).isoformat() instead of appending misleading "Z" suffix to naive datetime

Test plan

  • 14 new timezone utility tests pass (tests/test_utils_timezone.py)
  • Updated freeze task schedule timing tests mock now_chicago instead of datetime
  • Full test suite passes (925 passed, 3 skipped)

Closes #43

🤖 Generated with Claude Code

## Summary - Adds `utils/timezone.py` with centralized Chicago timezone helpers (`now_chicago()`, `to_chicago()`, `to_discord_timestamp()`, etc.) - Fixes `tasks/transaction_freeze.py` scheduling to use `now_chicago()` instead of naive `datetime.now()`, ensuring freeze/thaw triggers at correct Chicago wall-clock times regardless of container timezone - Fixes `utils/logging.py` JSON timestamp to use `datetime.now(UTC).isoformat()` instead of appending misleading "Z" suffix to naive datetime ## Test plan - [x] 14 new timezone utility tests pass (`tests/test_utils_timezone.py`) - [x] Updated freeze task schedule timing tests mock `now_chicago` instead of `datetime` - [x] Full test suite passes (925 passed, 3 skipped) Closes #43 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cal added 2 commits 2026-02-22 22:16:24 +00:00
Documents the next-release staging branch pattern used for
batching changes before merging to main.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: use explicit America/Chicago timezone for freeze/thaw scheduling
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m16s
8a1a957c2a
The production container has ambiguous timezone config — /etc/localtime
points to Etc/UTC but date reports CST. The transaction freeze/thaw task
used datetime.now() (naive, relying on OS timezone), causing scheduling
to fire at unpredictable wall-clock times.

- Add utils/timezone.py with centralized Chicago timezone helpers
- Fix tasks/transaction_freeze.py to use now_chicago() for scheduling
- Fix utils/logging.py timestamp to use proper UTC-aware datetime
- Add 14 timezone utility tests
- Update freeze task tests to mock now_chicago instead of datetime

Closes #43

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cal merged commit 1df9527697 into next-release 2026-02-22 22:16:55 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/major-domo-v2#45
No description provided.