Get Current Unix Timestamp using Go

time package

package main

import (
    "fmt"
    "time"
)

func main() {
    timestamp := time.Now().Unix()

    fmt.Println(timestamp)
}

Leave a Comment

Cancel reply

Your email address will not be published.