aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/time
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-02-05 14:33:27 -0800
committerIan Lance Taylor <iant@golang.org>2020-02-15 09:14:10 -0800
commit0b3c2eed35d608d6541ecf004a9576b4eae0b4ef (patch)
treec92c05d53eb054d8085d069800f4e9b586fef5a3 /libgo/go/time
parent17edb3310d8ce9d5f6c9e53f6c1f7d611c2a5a41 (diff)
downloadgcc-0b3c2eed35d608d6541ecf004a9576b4eae0b4ef.zip
gcc-0b3c2eed35d608d6541ecf004a9576b4eae0b4ef.tar.gz
gcc-0b3c2eed35d608d6541ecf004a9576b4eae0b4ef.tar.bz2
libgo: update to Go1.14rc1 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/218017
Diffstat (limited to 'libgo/go/time')
-rw-r--r--libgo/go/time/format.go3
-rw-r--r--libgo/go/time/sleep_test.go2
-rw-r--r--libgo/go/time/time.go3
3 files changed, 7 insertions, 1 deletions
diff --git a/libgo/go/time/format.go b/libgo/go/time/format.go
index b531cb4..9beb5d9 100644
--- a/libgo/go/time/format.go
+++ b/libgo/go/time/format.go
@@ -792,6 +792,9 @@ func skip(value, prefix string) (string, error) {
// Years must be in the range 0000..9999. The day of the week is checked
// for syntax but it is otherwise ignored.
//
+// For layouts specifying the two-digit year 06, a value NN >= 69 will be treated
+// as 19NN and a value NN < 69 will be treated as 20NN.
+//
// In the absence of a time zone indicator, Parse returns a time in UTC.
//
// When parsing a time with a zone offset like -0700, if the offset corresponds
diff --git a/libgo/go/time/sleep_test.go b/libgo/go/time/sleep_test.go
index 26cc488..9c4de6d 100644
--- a/libgo/go/time/sleep_test.go
+++ b/libgo/go/time/sleep_test.go
@@ -357,7 +357,7 @@ func TestTimerStopStress(t *testing.T) {
for i := 0; i < 100; i++ {
go func(i int) {
timer := AfterFunc(2*Second, func() {
- t.Fatalf("timer %d was not stopped", i)
+ t.Errorf("timer %d was not stopped", i)
})
Sleep(1 * Second)
timer.Stop()
diff --git a/libgo/go/time/time.go b/libgo/go/time/time.go
index 10a132f..5dc9fa6 100644
--- a/libgo/go/time/time.go
+++ b/libgo/go/time/time.go
@@ -1148,6 +1148,9 @@ func (t Time) Zone() (name string, offset int) {
// Unix returns t as a Unix time, the number of seconds elapsed
// since January 1, 1970 UTC. The result does not depend on the
// location associated with t.
+// Unix-like operating systems often record time as a 32-bit
+// count of seconds, but since the method here returns a 64-bit
+// value it is valid for billions of years into the past or future.
func (t Time) Unix() int64 {
return t.unixSec()
}