获取今日零时:

date := time.Now().Format("20060102")
todayZero, _ := time.ParseInLocation("20060102", date, time.Local)
fmt.Println(todayZero) // 2022-05-25 00:00:00 +0800 CST
posted on 2022-05-25 19:10  Boom__Clap  阅读(7)  评论(0编辑  收藏  举报