Skip to content

Force the local test Postgres container to timezone=UTC - #33

Merged
aersam merged 1 commit into
mainfrom
worktree-testdb-utc-timezone
Sep 8, 2026
Merged

Force the local test Postgres container to timezone=UTC#33
aersam merged 1 commit into
mainfrom
worktree-testdb-utc-timezone

Conversation

@aersam

@aersam aersam commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

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
@aersam
aersam merged commit 111e9da into main Sep 8, 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.

1 participant