fix(139): fixed time zone (close #5263)

This commit is contained in:
Andy Hsu
2023-09-22 16:54:16 +08:00
parent 0f03a747d8
commit a64dd4885e
2 changed files with 4 additions and 2 deletions

View File

@ -5,8 +5,10 @@ import (
"time"
)
var CNLoc = time.FixedZone("UTC", 8*60*60)
func MustParseCNTime(str string) time.Time {
lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05 -07", str+" +08", time.Local)
lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05 -07", str+" +08", CNLoc)
return lastOpTime
}