基于秒的 unix时间戳 获取,相当于php time(), 可以保存到mysql int32 中
func main() {
times := int32(time.Now().Unix()) //基于秒的unix时间戳
fmt.Println(times)
}
GOROOT=C:\Go #gosetup
GOPATH=D:\myProject\go #gosetup
C:\Go\bin\go.exe build -o D:\myProject\go\TEST\bin\go_build_TEST_src__1_.exe D:/myProject/go/TEST/src/grequestsTest.go #gosetup
D:\myProject\go\TEST\bin\go_build_TEST_src__1_.exe #gosetup
1612402408
Process finished with exit code 0