fix(189pc): wrong time if location incorrect (close #1562)
This commit is contained in:
@ -78,7 +78,8 @@ func timestamp() int64 {
|
||||
}
|
||||
|
||||
func MustParseTime(str string) *time.Time {
|
||||
lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05", str, time.Local)
|
||||
loc, _ := time.LoadLocation("Asia/Shanghai")
|
||||
lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05", str, loc)
|
||||
return &lastOpTime
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user