fix(wopan): use fixed timezone for parsing time (#1170)

fix(wopan): update getTime function to use fixed timezone for parsing

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
This commit is contained in:
MadDogOwner
2025-08-28 13:02:02 +08:00
committed by GitHub
parent f350ccdf95
commit bbd4389345

View File

@ -36,5 +36,6 @@ func (d *Wopan) getSpaceType() string {
// 20230607214351 // 20230607214351
func getTime(str string) (time.Time, error) { func getTime(str string) (time.Time, error) {
return time.Parse("20060102150405", str) loc := time.FixedZone("UTC+8", 8*60*60)
return time.ParseInLocation("20060102150405", str, loc)
} }