Skip to content

Commit

Permalink
fix TimestampMS MarshalJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
usk81 committed Apr 14, 2017
1 parent a61ffe6 commit 805b7d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion type_timestamp_milliseconds.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (v TimestampMS) MarshalJSON() ([]byte, error) {
if !v.Valid() {
return json.Marshal(nil)
}
return []byte(strconv.FormatInt(v.Time.Unix(), 10)), nil
return []byte(strconv.FormatInt(v.Time.UnixNano()/1000000, 10)), nil
}

// UnmarshalJSON implements the json.Unmarshaler interface.
Expand Down

0 comments on commit 805b7d5

Please sign in to comment.