Mark McGranaghan a8ee83af78 Emphasize time constants
In most cases users will format and parse times using the constants
provided in package time. Show these first before getting into custom
example-based formats.
2014-04-15 18:09:28 -07:00

11 lines
304 B
Bash

$ go run time-formatting-parsing.go
2014-04-15T18:00:15-07:00
2012-11-01 22:08:41 +0000 +0000
6:00PM
Tue Apr 15 18:00:15 2014
2014-04-15T18:00:15.161182-07:00
0000-01-01 20:41:00 +0000 UTC
2014-04-15T18:00:15-00:00
parsing time "8:41PM" as "Mon Jan _2 15:04:05 2006": \
cannot parse "8:41PM" as "Mon"