简单代码:
func main() { date := "2020-12-23T16:39:24.362+06:00" t, _ := time.Parse("2006-01-02T15:04:05.000+06:00", date) fmt.Printf("t = %s", t)}
结果是t = 2006-12-23 16:39:24.362 +0000 UTC
游乐场链接:https: //play.golang.org/p/3U6CzIrrMsM
我在哪里做错了?
呼啦一阵风
相关分类