From 12092cf2976fd61af0924c498fb749f95d4d49ef Mon Sep 17 00:00:00 2001 From: niksis02 Date: Tue, 20 Jan 2026 02:32:54 +0400 Subject: [PATCH] fix: fixes the SignedStreamingPayloadTrailer_success test failure In the `SignedStreamingPayloadTrailer_success` integration test, the signing date was not using UTC. This caused an incorrect string-to-sign and signature calculation, because the timestamp used for `x-amz-date` (which is always UTC) differed from the timestamp used for streaming payload signature generation. The test now uses UTC, resolving the issue that occurred when the local time zone differed from UTC, specifically in terms of the `yyyymmdd` date component. --- tests/integration/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/utils.go b/tests/integration/utils.go index b9cda7b7..e4d49e2f 100644 --- a/tests/integration/utils.go +++ b/tests/integration/utils.go @@ -2221,7 +2221,7 @@ func testSignedStreamingObjectPut(s *S3Conf, bucket, object string, payload []by } signer := v4.NewSigner() - signingTime := time.Now() + signingTime := time.Now().UTC() // sign the request err = signer.SignHTTP(ctx, aws.Credentials{AccessKeyID: s.awsID, SecretAccessKey: s.awsSecret}, req, sha256Header, "s3", s.awsRegion, signingTime) @@ -2458,7 +2458,7 @@ func getAWS4StreamingTrailer( yearMonthDay := signingTime.Format("20060102") // ISO8601 basic format: yyyyMMdd'T'HHmmss'Z' - currentDateTime := signingTime.UTC().Format("20060102T150405Z") + currentDateTime := signingTime.Format("20060102T150405Z") // ///aws4_request serviceString := fmt.Sprintf(