Skip to content

fix(publish-docker): stamp BUILD_DATE as a UTC build time - #94

Open
scotwells wants to merge 1 commit into
mainfrom
fix/build-date-utc
Open

fix(publish-docker): stamp BUILD_DATE as a UTC build time#94
scotwells wants to merge 1 commit into
mainfrom
fix/build-date-utc

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

Problem

BUILD_DATE is github.event.head_commit.timestamp — the commit time in the committer's local UTC offset, not the build time in UTC. It is also unset on release events, so tagged releases build with an empty value.

Images that surface it show the result. Milo serves it on /version, where the convention is ISO8601 UTC:

# api.staging.env.datum.net/version today
buildDate: "2026-08-26T15:03:21-07:00"   # committer's local offset, and a commit time

# after
buildDate: "2026-08-26T22:03:21Z"

Change

Compute the timestamp during the build with date -u, matching the format Kubernetes serves.

Every consumer of this workflow that passes BUILD_DATE through picks this up on their next pin bump.

BUILD_DATE was github.event.head_commit.timestamp, which is the commit
time in the committer's local UTC offset ("2026-08-26T15:03:21-07:00")
rather than the build time in UTC, and is unset entirely on release
events. Images that surface it verbatim — Milo serves it as buildDate on
/version — report an off-convention timestamp, or none at all for a
tagged release.

Compute it from the build instead, in the ISO8601 UTC form Kubernetes
uses.
@scotwells
scotwells requested a review from a team as a code owner August 26, 2026 22:31
@scotwells
scotwells requested a review from andrewb3000 August 26, 2026 22:31
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