From 1fc0c1b18b71a0c83842b83d5df595af14124a8e Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Wed, 11 Feb 2026 21:27:35 -0800 Subject: [PATCH] Fix Dagger towncrier container using UTC instead of local time (#167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - The `build_changelog` Dagger container (`python:3.12-slim`) defaults to UTC, causing towncrier to stamp tomorrow's date when releases are cut in the evening PST. - This is the root cause of the docs website (built via Dagger) showing Feb 12 while the repo CHANGELOG (built directly on the runner) correctly showed Feb 11. - Fix: set `TZ=America/Los_Angeles` in the Dagger container before running towncrier. ## Verified - `docker run --rm python:3.12-slim` → `towncrier _get_date()` returns `2026-02-12` (wrong) - `docker run --rm -e TZ=America/Los_Angeles python:3.12-slim` → returns `2026-02-11` (correct) ## Test plan - [ ] Merge, then trigger a build-blumeops release - [ ] Verify the CHANGELOG date on https://docs.eblu.me/CHANGELOG matches the repo 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/167 --- .dagger/src/blumeops_ci/main.py | 1 + docs/changelog.d/fix-dagger-towncrier-tz.bugfix.md | 1 + 2 files changed, 2 insertions(+) create mode 100644 docs/changelog.d/fix-dagger-towncrier-tz.bugfix.md diff --git a/.dagger/src/blumeops_ci/main.py b/.dagger/src/blumeops_ci/main.py index 851720d..2b780ac 100644 --- a/.dagger/src/blumeops_ci/main.py +++ b/.dagger/src/blumeops_ci/main.py @@ -31,6 +31,7 @@ class BlumeopsCi: return await ( dag.container() .from_("python:3.12-slim") + .with_env_variable("TZ", "America/Los_Angeles") # git is required because towncrier stages CHANGELOG.md via git add .with_exec(["apt-get", "update", "-qq"]) .with_exec(["apt-get", "install", "-y", "-qq", "git"]) diff --git a/docs/changelog.d/fix-dagger-towncrier-tz.bugfix.md b/docs/changelog.d/fix-dagger-towncrier-tz.bugfix.md new file mode 100644 index 0000000..dc18699 --- /dev/null +++ b/docs/changelog.d/fix-dagger-towncrier-tz.bugfix.md @@ -0,0 +1 @@ +Set ``TZ=America/Los_Angeles`` in the Dagger ``build_changelog`` container so towncrier stamps the correct local date instead of UTC (which showed tomorrow's date for evening releases).