get date golang

package main

import (
    "fmt"
    "time"
)

func main() {
    // Step 1: Get the current date and time in UTC
    currentTimeUTC := time.Now().UTC()

    // Step 2: Format the current date and time as a string
    // using the layout "2006-01-02 15:04:05"
    formattedDateTime := currentTimeUTC.Format("2006-01-02 15:04:05")

    // Step 3: Print the formatted date and time
    fmt.Println("Current Date and Time (UTC):", formattedDateTime)
}