mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
types/time: add note about stripping monotonic part
This commit is contained in:
parent
54fe6ef73c
commit
dea34506fb
@ -11,6 +11,8 @@ func Now() time.Time {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Canonical returns UTC time with no monotonic component.
|
// 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 {
|
func Canonical(t time.Time) time.Time {
|
||||||
return t.Round(0).UTC()
|
return t.Round(0).UTC()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user