func HourTimestamp() int64 {
now := time.Now()
timestamp := now.Unix() - int64(now.Second()) - int64((60 * now.Minute()))
fmt.Println(timestamp, time.Unix(timestamp, 0), now.Unix())
return timestamp
}
Golang获取整点的时间戳
最新推荐文章于 2023-03-19 19:26:26 发布