1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:30:06 -07:00

time: clarify that monotonic clock is not returned by t.Unix

Prompted by CL 403996.

Change-Id: I8b480a9d361863d4770c7c9a4437431424f26994
Reviewed-on: https://go-review.googlesource.com/c/go/+/404695
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
Ian Lance Taylor 2022-05-06 15:43:48 -07:00 committed by Gopher Robot
parent 92998cde5a
commit e97ceb2782

View File

@ -64,6 +64,10 @@
// t.UnmarshalJSON, and t.UnmarshalText always create times with
// no monotonic clock reading.
//
// The monotonic clock reading exists only in Time values. It is not
// a part of Duration values or the Unix times returned by t.Unix and
// friends.
//
// Note that the Go == operator compares not just the time instant but
// also the Location and the monotonic clock reading. See the
// documentation for the Time type for a discussion of equality