From 81a67cd0e77f6dbfc3ee974bfc0b9056515f1611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Tue, 17 Jan 2017 16:54:45 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20call=20.UTC()=20on=20a=20time.T?= =?UTF-8?q?ime=20before=20.Unix()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .Unix() ignores the time location, so .UTC() does’t really do anything. Signed-off-by: Miloslav Trmač --- signature/signature.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signature/signature.go b/signature/signature.go index b2cfd22fe7..76e0a9ce13 100644 --- a/signature/signature.go +++ b/signature/signature.go @@ -44,7 +44,7 @@ var _ json.Marshaler = (*untrustedSignature)(nil) // MarshalJSON implements the json.Marshaler interface. func (s untrustedSignature) MarshalJSON() ([]byte, error) { - return s.marshalJSONWithVariables(time.Now().UTC().Unix(), "atomic "+version.Version) + return s.marshalJSONWithVariables(time.Now().Unix(), "atomic "+version.Version) } // Implementation of MarshalJSON, with a caller-chosen values of the variable items to help testing.