force all internal MinIO operations to be under UTC (#16009)

This commit is contained in:
Harshavardhana 2022-11-04 16:44:38 -07:00 committed by GitHub
parent 808ecfe0f2
commit 76c4ea7682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -16,3 +16,10 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
package init package init
import "os"
func init() {
// All MinIO operations must be under UTC.
os.Setenv("TZ", "UTC")
}

View File

@ -18,10 +18,15 @@
package init package init
import ( import (
"os"
"github.com/klauspost/cpuid/v2" "github.com/klauspost/cpuid/v2"
) )
func init() { func init() {
// All MinIO operations must be under UTC.
os.Setenv("TZ", "UTC")
// Temporary workaround for // Temporary workaround for
// https://github.com/golang/go/issues/49233 // https://github.com/golang/go/issues/49233
// Keep until upstream has been fixed. // Keep until upstream has been fixed.