diff --git a/http.go b/http.go index 02a7ad32..8ef96e80 100644 --- a/http.go +++ b/http.go @@ -379,7 +379,7 @@ func (h *httpHandler) authenticate(conn net.Conn, req *http.Request, resp *http. } else { resp.Header = http.Header{} resp.Header.Set("Server", "nginx/1.14.1") - resp.Header.Set("Date", time.Now().Format(http.TimeFormat)) + resp.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) if resp.StatusCode == http.StatusOK { resp.Header.Set("Connection", "keep-alive") } diff --git a/http2.go b/http2.go index 72c48906..6587f032 100644 --- a/http2.go +++ b/http2.go @@ -539,7 +539,7 @@ func (h *http2Handler) authenticate(w http.ResponseWriter, r *http.Request, resp } else { resp.Header = http.Header{} resp.Header.Set("Server", "nginx/1.14.1") - resp.Header.Set("Date", time.Now().Format(http.TimeFormat)) + resp.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat)) if resp.ContentLength > 0 { resp.Header.Set("Content-Type", "text/html") }