RFC 3339
The internet standard timestamp format, such as 2025-01-02T03:04:05Z, that machines and people can both read without ambiguity.
In more detail
It orders date and time from largest to smallest unit and ends with a time zone offset, where Z means UTC. It is a sensible default for logs and data exchanged between machines.
Examples
t.Format(time.RFC3339) // 2025-01-02T03:04:05ZGo: t.Format(time.RFC3339) gives 2025-01-02T03:04:05ZRelated terms
- UTC — Coordinated Universal Time, the worldwide reference time that does not change with seasons or time zones.
- reference time layout — Go's way of describing a date format by writing one fixed example moment, 2006-01-02 15:04:05, in the shape you want.
- RFC — A numbered document published by the RFC Editor, many of which are the official standards for internet protocols such as HTTP.
Taught in
- The time Package — Concurrent Systems Programming with Go