Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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 -> Details I see the following:
with has the tiem with the correct timezone. Is there a way to get this information from the api call to filesListFolder, preferably as client_modified?
Thanks much for your help
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.
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.
thanks for the fast, detailed response.
Hi there!
If you need more help you can view your support options (expected response time for a 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!