Browse Source

types/time: add note about stripping monotonic part

pull/2343/head
Ethan Buchman 6 years ago
parent
commit
dea34506fb
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      types/time/time.go

+ 2
- 0
types/time/time.go View File

@ -11,6 +11,8 @@ func Now() time.Time {
}
// Canonical returns UTC time with no monotonic component.
// Stripping the monotonic component is for time equality.
// See https://github.com/tendermint/tendermint/pull/2203#discussion_r215064334
func Canonical(t time.Time) time.Time {
return t.Round(0).UTC()
}


Loading…
Cancel
Save