tmtime: Canonical, some comments (#2312)

This commit is contained in:
Ethan Buchman
2018-09-04 04:20:58 -04:00
committed by Anton Kaliaev
parent 166fd82b70
commit eabb1ece8e
4 changed files with 15 additions and 5 deletions

View File

@ -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)
}