year:=time.Now().Year()
month:=time.Now().Month()//time.Now().Month().String()
day:=time.Now().Day()
- 字符串转Time
tm := "2019-01-01 01:01:01"
t1, _ = time.Parse("2006-01-02 15:04:05", tm )
date := "2019-01-01"
t2, _ = time.Parse("2006-01-02", date)
- 毫秒时间戳转Time
ms:= 1572958141000
t := time.Unix(ms/1000, 0)