fix: convert to UTC before formatting to http.TimeFormat
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
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?
What are the relevant issue numbers?
Maybe also #29394
Edited by clyfish