aboutsummaryrefslogtreecommitdiff
path: root/src/testing/synctest/synctest.go
diff options
context:
space:
mode:
authorChristian Hoeppner <hoeppi@google.com>2025-07-04 18:40:42 +0000
committerDamien Neil <dneil@google.com>2025-07-10 13:16:07 -0700
commitaa5de9ebb55bbd5e0a38304f8f8e603b2ec03238 (patch)
tree80fbcef7b26d315d93b5c807021866ba3568a2f5 /src/testing/synctest/synctest.go
parent63ec70d4e1350f44caf950cf3f675ae2cb7ea453 (diff)
downloadgo-aa5de9ebb55bbd5e0a38304f8f8e603b2ec03238.tar.xz
synctest: fix comments for time.Now() in synctests
Also add a test case to make sure that time.Now() results in the documented date. Change-Id: Ic4cc577eba485b7c6e1a64122da06d7075bbe12e Reviewed-on: https://go-review.googlesource.com/c/go/+/685677 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Christian Höppner <hoeppi@google.com> Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/testing/synctest/synctest.go')
-rw-r--r--src/testing/synctest/synctest.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing/synctest/synctest.go b/src/testing/synctest/synctest.go
index 0911519aab..ff88c3ec42 100644
--- a/src/testing/synctest/synctest.go
+++ b/src/testing/synctest/synctest.go
@@ -22,7 +22,7 @@
//
// func TestTime(t *testing.T) {
// synctest.Test(t, func(t *testing.T) {
-// start := time.Now() // always midnight UTC 2001-01-01
+// start := time.Now() // always midnight UTC 2000-01-01
// go func() {
// time.Sleep(1 * time.Second)
// t.Log(time.Since(start)) // always logs "1s"