cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Python API client_modified resolution

Python API client_modified resolution

aplowman
Explorer | Level 4
Go to solution

When I set the `client_modified` of the `files_upload` method in the Python API and then use `files_get_metadata` to inspect the `client_modified` attribute, I notice that the datetime.datetime object has had the microseconds set to zero. Does this mean the best resolution of the `client_modified` metadata is 1 second? This seems a bit too coarse if so. Regardless, may I ask whether the datetime is rounded to the nearest second or are the microseconds simply culled? I need to know this so I can then do comparisons. Thanks!

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Yes, the Dropbox API itself uses UTC datetime strings in the ISO 8601 "combined date and time representation" format, so it has a resolution of seconds, not smaller.

The Python SDK does the formatting locally to conform with the Dropbox API spec before sending it to Dropbox. The format string is '%Y-%m-%dT%H:%M:%SZ', and any microseconds are just culled, not rounded.

I'll pass this along as a feature request for a finer time resolution, though I can't promise if or when that might be implemented.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

Yes, the Dropbox API itself uses UTC datetime strings in the ISO 8601 "combined date and time representation" format, so it has a resolution of seconds, not smaller.

The Python SDK does the formatting locally to conform with the Dropbox API spec before sending it to Dropbox. The format string is '%Y-%m-%dT%H:%M:%SZ', and any microseconds are just culled, not rounded.

I'll pass this along as a feature request for a finer time resolution, though I can't promise if or when that might be implemented.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?