From 2c66bdd6bb0a4b64ae82d199ae0916470a834993 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 8 Nov 2015 10:42:50 +0000 Subject: [PATCH] Remove Go 1.5-ism to make compilable by go 1.3 & 1.4 - fixes #201 --- onedrive/api/types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onedrive/api/types.go b/onedrive/api/types.go index b81cd0ea2..062b50da2 100644 --- a/onedrive/api/types.go +++ b/onedrive/api/types.go @@ -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