fix: 移除 GTime 函数中多余的时区处理逻辑

This commit is contained in:
hailaz
2025-09-18 11:47:41 +08:00
parent c3a2a2f5f9
commit aa48e7b829

View File

@ -143,13 +143,5 @@ func (c *Converter) GTime(anyInput any, format ...string) (*gtime.Time, error) {
// Parse as time string with timezone preservation
// Enhanced: if the string lacks timezone info, try to parse it with RFC3339 format first
// This helps preserve timezone when the original gtime had timezone information
result, err := gtime.StrToTime(s)
if err == nil && result != nil {
// If parsing succeeded but the result is in local timezone while
// the string suggests it should be in a different timezone,
// we may need additional handling here in the future
return result, nil
}
return gtime.StrToTime(s)
}