mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
tmtime: Canonical, some comments (#2312)
This commit is contained in:
committed by
Anton Kaliaev
parent
166fd82b70
commit
eabb1ece8e
@ -4,6 +4,7 @@ import (
|
||||
"time"
|
||||
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
)
|
||||
|
||||
// Canonical json is amino's json for structs with fields in alphabetical order
|
||||
@ -110,5 +111,5 @@ func CanonicalTime(t time.Time) string {
|
||||
// Note that sending time over amino resets it to
|
||||
// local time, we need to force UTC here, so the
|
||||
// signatures match
|
||||
return t.Round(0).UTC().Format(TimeFormat)
|
||||
return tmtime.Canonical(t).Format(TimeFormat)
|
||||
}
|
||||
|
Reference in New Issue
Block a user