fix(sigv4): UTC strftime date format (%Y%m%d%H%M%S)

This commit is contained in:
sam
2026-09-09 17:32:21 +10:00
parent f1fc99761f
commit 5bec37a8a1

View File

@@ -57,8 +57,9 @@ func signGet(endpoint, bucket, key, secret, name string, now time.Time) SignedGe
const region = "garage" // s3_region const region = "garage" // s3_region
const service = "s3" const service = "s3"
date := now.Format("YYYYMMDD") utc := now.UTC()
tstamp := now.Format("HHmmss") date := utc.Format("%Y%m%d")
tstamp := utc.Format("%H%M%S")
amzDate := date + "T" + tstamp + "Z" amzDate := date + "T" + tstamp + "Z"
host := endpoint host := endpoint