The specific string
Golang uses a very specific string for formatting time output, and it is this Mon Jan 2 15:04:05 MST 2006
The reference time is in numerical order but for the -0700 timezone (California is GMT-7 🙄):
Layout = "01/02 03:04:05PM '06 -0700" // The reference time, in numerical order.
Example
To setup your date and time formatting you have to rearrange those exact values.
|
|
The values will then get replaced by the time.Time value for the given variable, i.e. 2006 will become 2022 and so on.
More info here