Closed xsbr closed 9 years ago
I'm still seeing an error: Error: <HttpError 400 when requesting https://www.googleapis.com/drive/v2/files/0Bxz1GwrmCSg4T2MzQVR6amJtR00?alt=json&setModifiedDate=true&newRevision=true returned "Invalid value for: Invalid format: "2014-05-31T15:39:29+00:00" is malformed at "+00:00"">
Was able to fix(?) this by using strftime("%Y-%m-%dT%H:%M:%S.%f%z")
instead of isoformat()
. It seems that microseconds are required in the RFC 3339 spec, or at least that's what the Drive API requires here.
Still trying to sort out whether it's all working properly, but the HttpError 400 is gone. Thanks @xsbr for pointing the way...
Running gsync received this error about an invalid datetime format:
According Google Drive API Documentation, DateTime needs to be in ISO8601 format and timezone is required https://developers.google.com/resources/api-libraries/documentation/drive/v2/java/latest/com/google/api/services/drive/model/File.html http://en.wikipedia.org/wiki/ISO_8601
isoformat() in python doesn't include TimeZone unless be defined, so I put tzinfo in all isoformat() calls
I found another bizarre error:
There is a "d" character in strftime