Skip to content

Commit

Permalink
Don’t call .UTC() on a time.Time before .Unix()
Browse files Browse the repository at this point in the history
.Unix() ignores the time location, so .UTC() does’t really do anything.

Signed-off-by: Miloslav Trmač <[email protected]>
  • Loading branch information
mtrmac committed Jan 17, 2017
1 parent 954ed4b commit 81a67cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion signature/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 81a67cd

Please sign in to comment.