diff --git a/providers/dns/brandit/internal/client.go b/providers/dns/brandit/internal/client.go index cba8eefc1e..59c57419a0 100644 --- a/providers/dns/brandit/internal/client.go +++ b/providers/dns/brandit/internal/client.go @@ -178,17 +178,12 @@ func (c *Client) do(ctx context.Context, query url.Values, result any) error { } func sign(apiUsername, apiKey string, query url.Values) (url.Values, error) { - location, err := time.LoadLocation("GMT") - if err != nil { - return nil, fmt.Errorf("time location: %w", err) - } - - timestamp := time.Now().In(location).Format("2006-01-02T15:04:05Z") + timestamp := time.Now().UTC().Format("2006-01-02T15:04:05Z") canonicalRequest := fmt.Sprintf("%s%s%s", apiUsername, timestamp, defaultBaseURL) mac := hmac.New(sha256.New, []byte(apiKey)) - _, err = mac.Write([]byte(canonicalRequest)) + _, err := mac.Write([]byte(canonicalRequest)) if err != nil { return nil, err } diff --git a/providers/dns/nifcloud/internal/client.go b/providers/dns/nifcloud/internal/client.go index 02d11fead7..4469a1f78e 100644 --- a/providers/dns/nifcloud/internal/client.go +++ b/providers/dns/nifcloud/internal/client.go @@ -121,12 +121,7 @@ func (c *Client) do(req *http.Request, result any) error { func (c *Client) sign(req *http.Request) error { if req.Header.Get("Date") == "" { - location, err := time.LoadLocation("GMT") - if err != nil { - return err - } - - req.Header.Set("Date", time.Now().In(location).Format(time.RFC1123)) + req.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) } if req.URL.Path == "" { diff --git a/providers/dns/websupport/internal/client.go b/providers/dns/websupport/internal/client.go index cc40e9deaa..4fef0be91f 100644 --- a/providers/dns/websupport/internal/client.go +++ b/providers/dns/websupport/internal/client.go @@ -150,12 +150,7 @@ func (c *Client) DeleteRecord(ctx context.Context, domainName string, recordID i func (c *Client) do(req *http.Request, result any) error { req.Header.Set("Accept-Language", "en_us") - location, err := time.LoadLocation("GMT") - if err != nil { - return fmt.Errorf("time location: %w", err) - } - - err = c.sign(req, time.Now().In(location)) + err := c.sign(req, time.Now().UTC()) if err != nil { return fmt.Errorf("signature: %w", err) }