生命不止,继续 go go go !!!
每种语言都需要对时间进行处理,golang当然也不例外,go语言为我们提供了time package用于各种时间的转换,处理。
Package time provides functionality for measuring and displaying time.
func Now
func Now() Time
Now returns the current local time.
func (Time) UTC
func (t Time) UTC() Time
UTC returns t with the location set to UTC.
func (Time) Unix
func (t Time) Unix() int64
Unix returns t as a Unix time, the number of seconds elapsed since January 1, 1970 UTC.