Skip to content

Fix cache's Last-Modified header by ensuring it is set to UTC

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?

Closes #38403

Maybe also #29394

Edited by Arran Walker

Merge request reports

Loading