Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

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

Nick Craig-Wood2c66bdd6bb0a
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