fix: use user.UpdatedTime as scim.Meta.Version instead of user.Id (#2406)

* 111

* fix: use user.UpdatedTime as scim.Meta.Version instead of user.Id

---------

Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
haiwu
2023-10-14 11:03:58 +08:00
committed by GitHub
parent 43d849086f
commit 3d80ec721f
2 changed files with 8 additions and 1 deletions

View File

@ -54,6 +54,10 @@ func String2Time(timestamp string) time.Time {
return parseTime
}
func Time2String(timestamp time.Time) string {
return timestamp.Format(time.RFC3339)
}
func IsTokenExpired(createdTime string, expiresIn int) bool {
createdTimeObj, _ := time.Parse(time.RFC3339, createdTime)
expiresAtObj := createdTimeObj.Add(time.Duration(expiresIn) * time.Second)