Standard library / time

time.UnixDate

Traditional Unix date layout with abbreviated zone. This is a layout, not a timestamp; Parse is not a full RFC validator. Expected stdout: 'Thu Feb 29 12:34:56 UTC 2024\n'.

Formal Syntax & Structure

go syntaxgo
const UnixDate    = "Mon Jan _2 15:04:05 MST 2006"

Working Example

Example Snippetgo
package main
import (  "fmt"  "time")
func fixed() time.Time { return time.Date(2024, 2, 29, 12, 34, 56, 123000000, time.UTC) }func main()            { fmt.Println(fixed().Format(time.UnixDate)) }
Go Reference