diff --git a/internal/init/init.go b/internal/init/init.go index 7d0c432f8..36b9fe93a 100644 --- a/internal/init/init.go +++ b/internal/init/init.go @@ -16,3 +16,10 @@ // along with this program. If not, see . package init + +import "os" + +func init() { + // All MinIO operations must be under UTC. + os.Setenv("TZ", "UTC") +} diff --git a/internal/init/init_darwin_amd64.go b/internal/init/init_darwin_amd64.go index 7bc01758e..b72ba2a04 100644 --- a/internal/init/init_darwin_amd64.go +++ b/internal/init/init_darwin_amd64.go @@ -18,10 +18,15 @@ package init import ( + "os" + "github.com/klauspost/cpuid/v2" ) func init() { + // All MinIO operations must be under UTC. + os.Setenv("TZ", "UTC") + // Temporary workaround for // https://github.com/golang/go/issues/49233 // Keep until upstream has been fixed.