Standard library / time
time.RFC3339
Timestamp with numeric offset or Z for UTC; no fractional seconds when formatting. This is a layout, not a timestamp; Parse is not a full RFC validator. Expected stdout: '2024-02-29T12:34:56Z\n'.
Formal Syntax & Structure
go syntaxgo
const RFC3339 = "2006-01-02T15:04:05Z07:00"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.RFC3339)) }