例如:如何在 t
时间更新小时数?
fmt.Println(t)
//=> 2006-01-02 15:04:05 +0000 UTC
期望得到:2006-01-02 00:00:00 +0000 UTC
编辑:类似于:time.Time Round to Day
最佳答案
使用:
t1 := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, t.Nanosecond(), t.Location())
关于go - 如何更新 golang 时间的小时、分钟、秒?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53456705/