Closed zhangdekui closed 4 months ago
This is very easy to make mistakes... The following code is the standard library of golang: b := time.Date(2022, time.March, 10, 10, 0, 0, 0, time.UTC) a := time.Now() diff := a.Sub(b) fmt.Println(diff.Hours())
result is 20464.558380785, is a-b !
The API has been determined and cannot be changed arbitrarily
This is very easy to make mistakes... The following code is the standard library of golang: b := time.Date(2022, time.March, 10, 10, 0, 0, 0, time.UTC) a := time.Now() diff := a.Sub(b) fmt.Println(diff.Hours())
result is 20464.558380785, is a-b !