use UTC for cookie expiry date in backend (#566)

This commit is contained in:
mox46 2023-02-05 04:56:34 -05:00 committed by GitHub
parent 257506ae19
commit 52d9a6322f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,7 +86,7 @@ func (h *handler) apiLogin(w http.ResponseWriter, r *http.Request, ps httprouter
Session string `json:"session"`
Account model.Account `json:"account"`
Expires string `json:"expires"`
}{strSessionID, account, time.Now().Add(expTime).Format(time.RFC1123)}
}{strSessionID, account, time.Now().UTC().Add(expTime).Format(time.RFC1123)}
w.Header().Set("Content-Type", "application/json")
err = json.NewEncoder(w).Encode(&loginResult)