diff --git a/backend/cmd/backend/main.go b/backend/cmd/backend/main.go index b558c4c..0efd1d4 100644 --- a/backend/cmd/backend/main.go +++ b/backend/cmd/backend/main.go @@ -13,6 +13,13 @@ import ( "os/signal" "syscall" + // time/tzdata embeds the IANA timezone database so time.LoadLocation + // works in container images without /usr/share/zoneinfo (distroless + // static, alpine without the tzdata apk). The auth and user-settings + // flows validate the caller's `time_zone` via time.LoadLocation; + // without this import only "UTC" and fixed offsets would resolve. + _ "time/tzdata" + "galaxy/backend/internal/admin" "galaxy/backend/internal/app" "galaxy/backend/internal/auth" diff --git a/integration/testenv/session.go b/integration/testenv/session.go index 95054d0..ae20aae 100644 --- a/integration/testenv/session.go +++ b/integration/testenv/session.go @@ -63,7 +63,12 @@ func RegisterSession(t *testing.T, plat *Platform, email string) *Session { } code := m[1] - confirm, _, err := public.ConfirmEmailCode(ctx, send.ChallengeID, code, EncodePublicKey(pub), "UTC") + // Pass a non-UTC IANA zone so every integration scenario that + // enrols a pilot exercises the time.LoadLocation path. UTC works + // even when the backend image lacks tzdata (Go's no-data fallback + // covers it), so a regression that drops the embedded tzdata + // import would otherwise slip past unnoticed. + confirm, _, err := public.ConfirmEmailCode(ctx, send.ChallengeID, code, EncodePublicKey(pub), "Europe/Berlin") if err != nil { t.Fatalf("confirm-email-code: %v", err) }