You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

tiamat's avatar
tiamat
Helpful | Level 6
4 years ago

client_modified on filesListFolder entries all in UTC, lose TZ info

Hi, I have Automatic Timezone set to ON in my account but all the entries returned from an api call to filesListFolder are in UTC. When I download a file on Windows then right click -> Properties -...
  • Greg-DB's avatar
    4 years ago

    The "Automatic time zone" setting applies to the Dropbox UI, not the Dropbox API. The Dropbox API uses UTC for file metadata, and API clients can then format times to display them in whatever format and time zone desired.

     

    By default, the Dropbox API returns two pieces of time information in the standard file metadata for all files:

    client_modified Timestamp(format="%Y-%m-%dT%H:%M:%SZ") For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not.
    server_modified Timestamp(format="%Y-%m-%dT%H:%M:%SZ") The last time the file was modified on Dropbox.

    The 'server_modified' time is always the time that the file was committed to the Dropbox servers. If you control the API client doing the upload in the first place, you can set 'client_modified' to whatever you want, e.g., using filesUpload in the JavaScript SDK by setting the FilesCommitInfo.client_modified. (Based on your 'filesListFolder' reference it seems you're using the JavaScript SDK, but the same functionality exists in the other official SDKs as well as the HTTPS interface itself.) If 'client_modified' is not set by the client, it will be the same as 'server_modified'.

     

    From your screenshot though, it looks like you may actually be referring to the datetime information embedded in a photo file in the "EXIF" data. The Dropbox API doesn't return this photo metadata as metadata for the file by default, e.g,. as 'server_modified' or 'client_modified', but you can request some of this metadata separately, by setting FilesGetMetadataArg.include_media_info to true when calling filesGetMetadata. If available, Dropbox will return some of this media metadata in the returned FilesFileMetadata.media_info. For example, the time of the photograph, if available in the EXIF data, will be returned in FilesPhotoMetadata.time_taken.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,883 PostsLatest Activity: 3 hours ago
326 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!