Convert Unix time in Go using the standard `time` package.
package main
import ("fmt"; "time")
func main() {
// Current timestamp
now := time.Now().Unix()
fmt.Println(now)
}// Date to timestamp
t, _ := time.Parse(time.RFC3339, "2024-01-01T00:00:00Z")
ts := t.Unix()// Timestamp to date
t := time.Unix(1704067200, 0)
fmt.Println(t.UTC())