Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
### Fixed

- Buffer the response in temporary file to avoid issues when stream is used by another request's body
- SignerV4: Fix signing request during DST change


## 1.27.1
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Signer/SignerV4.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct(string $scopeName, string $region)

public function presign(Request $request, Credentials $credentials, RequestContext $context): void
{
$now = $context->getCurrentDate() ?? new \DateTimeImmutable();
$now = $context->getCurrentDate() ?? new \DateTimeImmutable('now', new \DateTimeZone('UTC'));

// Signer date have to be UTC https://docs.aws.amazon.com/general/latest/gr/sigv4-date-handling.html
$now = $now->setTimezone(new \DateTimeZone('UTC'));
Expand All @@ -73,7 +73,7 @@ public function presign(Request $request, Credentials $credentials, RequestConte

public function sign(Request $request, Credentials $credentials, RequestContext $context): void
{
$now = $context->getCurrentDate() ?? new \DateTimeImmutable();
$now = $context->getCurrentDate() ?? new \DateTimeImmutable('now', new \DateTimeZone('UTC'));

// Signer date have to be UTC https://docs.aws.amazon.com/general/latest/gr/sigv4-date-handling.html
$now = $now->setTimezone(new \DateTimeZone('UTC'));
Expand Down