fix(backend): embed the IANA time-zone database
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 12s
CI / integration (pull_request) Successful in 20s
CI / ui (pull_request) Has been skipped
CI / conformance (pull_request) Successful in 11s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m51s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 12s
CI / integration (pull_request) Successful in 20s
CI / ui (pull_request) Has been skipped
CI / conformance (pull_request) Successful in 11s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m51s
The taxpayer's zone decides which tax month an income is filed under, and the config refuses to boot on a zone it cannot resolve rather than misfiling into UTC. That correctness was resting on the base image happening to ship /usr/share/zoneinfo — true of distroless/static-debian12 today, but not a thing to leave implicit on a path where being wrong means a wrong tax return. Costs about 450 KB of binary. Adds a config test pinning the default zone and the hard failure on an unknown one.
This commit is contained in:
@@ -15,6 +15,13 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
// The IANA time-zone database, embedded in the binary. The image ships one today, but the
|
||||
// dependency is not one to leave implicit: the taxpayer's zone decides which tax month an
|
||||
// income is filed under, and the config refuses to boot on a zone it cannot resolve rather
|
||||
// than silently falling back to UTC and misfiling. Embedding it makes that correctness
|
||||
// independent of whatever the base image happens to contain.
|
||||
_ "time/tzdata"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"go.uber.org/zap"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user