Force the local test Postgres container to timezone=UTC - #33
Merged
Conversation
Discovered while promoting OneSales' dev branch to test: production connects with session timezone=UTC, but pgdevkit never set the test container's timezone at all, leaving it to the base image's own OS default (Europe/Zurich here). Any ::date cast of a timestamptz column (e.g. a journey-feed date-index expression added directly to the downstream Database repo) then silently disagrees between test and prod for rows near local midnight -- confirmed live via a real test that inserted a literal date and read back the wrong day. Forces UTC on the container's own timezone GUC (-c timezone=UTC, alongside the existing fsync/synchronous_commit/full_page_writes speed flags) and via TZ/PGTZ env vars for any client library that consults the environment instead of asking Postgres. Only affects freshly created containers -- an existing pgdevkit-postgres container from before this fix needs a one-time `docker rm -f pgdevkit-postgres` (or podman equivalent) to pick it up; CI runners always start fresh. Bumps 0.6.1 -> 0.6.2. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aqh5NvxzHH2ysU4ziSuwov
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.