FIX: use proper time format (activitypub/client) (#4132)
use proper http time format than replacing with GMT in time.RFC1123 =) Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4132 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com> Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
This commit is contained in:
parent
ab95cc6726
commit
d6abb363f6
2 changed files with 9 additions and 3 deletions
|
@ -31,10 +31,8 @@ const (
|
|||
httpsigExpirationTime = 60
|
||||
)
|
||||
|
||||
// Gets the current time as an RFC 2616 formatted string
|
||||
// RFC 2616 requires RFC 1123 dates but with GMT instead of UTC
|
||||
func CurrentTime() string {
|
||||
return strings.ReplaceAll(time.Now().UTC().Format(time.RFC1123), "UTC", "GMT")
|
||||
return time.Now().UTC().Format(http.TimeFormat)
|
||||
}
|
||||
|
||||
func containsRequiredHTTPHeaders(method string, headers []string) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue