diff options
author | Russ Cox <rsc@golang.org> | 2022-02-03 14:12:08 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2022-04-11 16:34:30 +0000 |
commit | 19309779ac5e2f5a2fd3cbb34421dafb2855ac21 (patch) | |
tree | 67dfd3e5d96250325e383183f95b6f5fe1968514 /src/time/format.go | |
parent | 017933163ab6a2b254f0310c61b57db65cded92e (diff) | |
download | go-19309779ac5e2f5a2fd3cbb34421dafb2855ac21.tar.gz go-19309779ac5e2f5a2fd3cbb34421dafb2855ac21.zip |
all: gofmt main repo
[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]
Run the updated gofmt, which reformats doc comments,
on the main repository. Vendored files are excluded.
For #51082.
Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407
Reviewed-on: https://go-review.googlesource.com/c/go/+/384268
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/time/format.go')
-rw-r--r-- | src/time/format.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/time/format.go b/src/time/format.go index 95fe08b772..2f66df668b 100644 --- a/src/time/format.go +++ b/src/time/format.go @@ -8,12 +8,16 @@ import "errors" // These are predefined layouts for use in Time.Format and time.Parse. // The reference time used in these layouts is the specific time stamp: +// // 01/02 03:04:05PM '06 -0700 +// // (January 2, 15:04:05, 2006, in time zone seven hours west of GMT). // That value is recorded as the constant named Layout, listed below. As a Unix // time, this is 1136239445. Since MST is GMT-0700, the reference would be // printed by the Unix date command as: +// // Mon Jan 2 15:04:05 MST 2006 +// // It is a regrettable historic error that the date uses the American convention // of putting the numerical month before the day. // @@ -59,12 +63,15 @@ import "errors" // AM/PM mark: "PM" // // Numeric time zone offsets format as follows: +// // "-0700" ±hhmm // "-07:00" ±hh:mm // "-07" ±hh +// // Replacing the sign in the format with a Z triggers // the ISO 8601 behavior of printing Z instead of an // offset for the UTC zone. Thus: +// // "Z0700" Z or ±hhmm // "Z07:00" Z or ±hh:mm // "Z07" Z or ±hh @@ -484,6 +491,7 @@ func formatNano(b []byte, nanosec uint, std int) []byte { } // String returns the time formatted using the format string +// // "2006-01-02 15:04:05.999999999 -0700 MST" // // If the time has a monotonic clock reading, the returned string |