Skip to content

fix: convert to UTC before formatting to http.TimeFormat

clyfish requested to merge clyfish/gitlab-runner:fix-s3-tz into main

What does this MR do?

Convert to UTC before formatting to http.TimeFormat

Why was this MR needed?

https://pkg.go.dev/net/http#TimeFormat

TimeFormat is the time format to use when generating times in HTTP headers.
It is like time.RFC1123 but hard-codes GMT as the time zone.
The time being formatted must be in UTC for Format to generate the correct format.

What's the best way to test this MR?

#38403

What are the relevant issue numbers?

#38403

Maybe also #29394

Edited by clyfish

Merge request reports

Loading