forked from TrueCloudLab/rclone
Remove Go 1.5-ism to make compilable by go 1.3 & 1.4 - fixes #201
This commit is contained in:
parent
a4f3548bbf
commit
2c66bdd6bb
1 changed files with 2 additions and 2 deletions
|
@ -71,8 +71,8 @@ type Timestamp time.Time
|
||||||
|
|
||||||
// MarshalJSON turns a Timestamp into JSON (in UTC)
|
// MarshalJSON turns a Timestamp into JSON (in UTC)
|
||||||
func (t *Timestamp) MarshalJSON() (out []byte, err error) {
|
func (t *Timestamp) MarshalJSON() (out []byte, err error) {
|
||||||
out = (*time.Time)(t).UTC().AppendFormat(out, timeFormat)
|
timeString := (*time.Time)(t).UTC().Format(timeFormat)
|
||||||
return out, nil
|
return []byte(timeString), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalJSON turns JSON into a Timestamp
|
// UnmarshalJSON turns JSON into a Timestamp
|
||||||
|
|
Loading…
Reference in a new issue