]> Cypherpunks.ru repositories - gostls13.git/commitdiff
time: document that Parse truncates to nanosecond precision
authorIan Lance Taylor <iant@golang.org>
Thu, 27 Jan 2022 00:19:47 +0000 (16:19 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 15 Feb 2022 22:54:38 +0000 (22:54 +0000)
For #48685
Fixes #50806

Change-Id: Ie8be40e5794c0998538890a651ef8ec92cb72d3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/381155
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/time/format.go

index 5fb9cdc969395a0ef040de8d877cdbece5c60520..33e6543289aedd5915300206e578d1220d5018eb 100644 (file)
@@ -914,6 +914,7 @@ func skip(value, prefix string) (string, error) {
 // field immediately after the seconds field, even if the layout does not
 // signify its presence. In that case either a comma or a decimal point
 // followed by a maximal series of digits is parsed as a fractional second.
+// Fractional seconds are truncated to nanosecond precision.
 //
 // Elements omitted from the layout are assumed to be zero or, when
 // zero is impossible, one, so parsing "3:04pm" returns the time