Skip to content

Commit b0a607f

Browse files
authored
fix(core): Drop fractional seconds from formatted timestamps used for S3 signed-URL generation (fixes #1131). (#1128)
1 parent ebb637b commit b0a607f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/core/src/clp/aws/AwsAuthenticationSigner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ auto is_unreserved_characters(char c) -> bool {
9191

9292
auto get_formatted_timestamp_string(std::chrono::system_clock::time_point const& timestamp)
9393
-> string {
94-
return fmt::format("{:%Y%m%dT%H%M%SZ}", timestamp);
94+
auto const timestamp_secs = std::chrono::time_point_cast<std::chrono::seconds>(timestamp);
95+
return fmt::format("{:%Y%m%dT%H%M%SZ}", timestamp_secs);
9596
}
9697

9798
auto get_formatted_date_string(std::chrono::system_clock::time_point const& timestamp) -> string {

0 commit comments

Comments
 (0)