Remove Go 1.5-ism to make compilable by go 1.3 & 1.4 - fixes #201

This commit is contained in:
Nick Craig-Wood 2015-11-08 10:42:50 +00:00
parent a4f3548bbf
commit 2c66bdd6bb
1 changed files with 2 additions and 2 deletions

View File

@ -71,8 +71,8 @@ type Timestamp time.Time
// MarshalJSON turns a Timestamp into JSON (in UTC)
func (t *Timestamp) MarshalJSON() (out []byte, err error) {
out = (*time.Time)(t).UTC().AppendFormat(out, timeFormat)
return out, nil
timeString := (*time.Time)(t).UTC().Format(timeFormat)
return []byte(timeString), nil
}
// UnmarshalJSON turns JSON into a Timestamp