From 63974a551e3e51b9520a338db582c924ae801341 Mon Sep 17 00:00:00 2001 From: UndeadBaneGitHub Date: Sun, 11 Dec 2022 00:43:08 +0100 Subject: [PATCH] Remove stray `UTC()` call Only in `TokenGenerator` `mw.TimeFunc().UTC()` is called (all other places do not call `UTC`), making the result inconsistent with the result of other functions. --- auth_jwt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth_jwt.go b/auth_jwt.go index 3db5aca..1804494 100644 --- a/auth_jwt.go +++ b/auth_jwt.go @@ -669,7 +669,7 @@ func (mw *GinJWTMiddleware) TokenGenerator(data interface{}) (string, time.Time, } } - expire := mw.TimeFunc().UTC().Add(mw.Timeout) + expire := mw.TimeFunc().Add(mw.Timeout) claims["exp"] = expire.Unix() claims["orig_iat"] = mw.TimeFunc().Unix() tokenString, err := mw.signedString(token)