aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShenghou Ma <minux@golang.org>2015-05-19 21:24:31 -0400
committerRuss Cox <rsc@golang.org>2015-06-18 18:21:59 +0000
commit526b5017133f193b8f82912936288f1ea767ffca (patch)
treef8331ee0b12ed7a64869f3050da0f9ef7ddc7588 /src
parent1e0760354c8a929d9d84575106ae264fa6395132 (diff)
downloadgo-526b5017133f193b8f82912936288f1ea767ffca.tar.xz
time: correct unrepresentable Unix time comment
It's easy for someone who wants a time bigger than any valid time to reach for time.Unix(1<<63-1, 0), so it makes sense to explicit say such value is not valid. Fixes #10906 (again). Change-Id: If71e32472ae40d86c30e629b982406040a73c4c7 Reviewed-on: https://go-review.googlesource.com/10266 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/time/time.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time/time.go b/src/time/time.go
index fbf3f8d3c8..294cc77f41 100644
--- a/src/time/time.go
+++ b/src/time/time.go
@@ -966,8 +966,8 @@ func (t *Time) UnmarshalText(data []byte) (err error) {
// Unix returns the local Time corresponding to the given Unix time,
// sec seconds and nsec nanoseconds since January 1, 1970 UTC.
// It is valid to pass nsec outside the range [0, 999999999].
-// Not all sec values have a corresponding time value. Notable such
-// values are -1<<63 and 1<<63-1.
+// Not all sec values have a corresponding time value. One such
+// value is 1<<63-1 (the largest int64 value).
func Unix(sec int64, nsec int64) Time {
if nsec < 0 || nsec >= 1e9 {
n := nsec / 1e9