Open zifengyu opened 3 years ago
'Z' is not parsed after timePeriod '.'. In below sample, the timezone is not detected and ParseIn will have incorrect result.
func main() { loc, _ := time.LoadLocation("Asia/Shanghai") inputs := []string{ "1985-04-12T23:20:50Z", "1985-04-12T23:20:50.52Z"} for _, in := range inputs { t, _ := dateparse.ParseIn(in, loc) fmt.Println(t) } }
https://goplay.space/#Kj1UBJ-bHsW
'Z' is not parsed after timePeriod '.'. In below sample, the timezone is not detected and ParseIn will have incorrect result.
https://goplay.space/#Kj1UBJ-bHsW