From c4860f6c2953f93d6dd5d52fc8a3250748033508 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Mon, 11 Dec 2017 19:51:00 +0100 Subject: [PATCH] Force CanonicalTime to UTC fixes issue with vote serialization breaking the signatures --- types/canonical_json.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/canonical_json.go b/types/canonical_json.go index 22576247c..7d94d1e0c 100644 --- a/types/canonical_json.go +++ b/types/canonical_json.go @@ -113,5 +113,8 @@ func CanonicalHeartbeat(heartbeat *Heartbeat) CanonicalJSONHeartbeat { } func CanonicalTime(t time.Time) string { - return t.Format(timeFormat) + // note that sending time over go-wire resets it to + // local time, we need to force UTC here, so the + // signatures match + return t.UTC().Format(timeFormat) }