Improve API to allow the timestamps (date/time) of files/folders to be updated
The new OneDrive API still doesn’t allow the timestamps of uploaded files/folders to be updated (lastModifiedDateTime, createdDateTime). Instead, the timestamps are always set to the time of the upload. This loss of data prevents users from properly sorting their files by modification or creation date. It also prevents applications that use the timestamps from working properly (file synchronization, backup, etc.).
Please change the timestamp properties so they are writeable rather than read-only.

We’ve now shipped the fileSystemInfo property which allows you to read/write lastModifiedDateTime and createdDateTime as seen on the client.
21 comments
-
Thomas Stumpp commented
Works for me when copying / pasting via source (local drive) and target (OneDrive fB) visible via FileExplorer. Simple control c + v will preserve files date created. This doesn't work for folders but it's good enough.
-
Sacha commented
Groove Music use "createdDateTime" to sort musics AND NOT fileSystemInfoProperty.
So when I upload all my music on OneDrive I can not sort by date added.
2 solutions :
- enable user to sort by real creation time of file
- allow the timestamps (date/time) of files/folders to be updated in the OneDrive API -
Anonymous commented
Any solution for OneDrive for Business users? Seem fileSystemInfo only works for standard OneDrive accounts.
-
Yvan commented
Hi,
Not working in case of updating ... (PUT).
Also a problem with local time: if you upload a file with a -summer time (gmt+2)- "modified date/time", during - winter time (gmt+1) -, the time of the "modified date" on the server is converted to GMT+0 but the conversion is made based on winter time, so with a one hour difference which disrupts comparison applicationsY
-
Kotsak commented
Hi,
Currently I can only set the "fileSystemInfo" facet when uploading a file using the multi-part method as part of the metadata but I can't set it when uploading a large file via the resumable method. Are there any plans to allow inclusion of the "fileSystemInfo" facet in the
POST /drive/root:/{item-path}:/upload.createSession method? -
Jack commented
Thank you Ryan.
It is working as expected with SmartFTP :-) -
Anonymous commented
Hi , Ryan
We have check the onedrive resources the fileSystemInfo is read-only, not read and write.
Are you sure is already support the timestamp properties so they are writeable?
https://dev.onedrive.com/resources/item.htm -
Mik commented
Hi Ryan, I'm in a dialog with Synology there still have some major problems by keeping the modified date when copy files from the NAS to OneDrive with the agent. They are saying it has something to do with the Modified date is Read Only:
https://dev.onedrive.com/resources/item.htm
I'm a user between Microsoft and Synology and does not have the Technical wise. Do you think there are somebody from Microsoft that Synology can contact. Thank you in advance. Best regards Mik -
Anonymous commented
BOOM its done... when as all my recent imports create date is the date ad time of import
-
Mik commented
Ryan, do you have any status on this issue.
-
Mik commented
It is not only Business it is unuseable for. The problem with storing Photo gives a huge problems also.
-
Jasper commented
I just created an automator folder action on my Mac to automatically rename the files in the camera roll folder to include the data and timestamp. For photos there is usually not an issue as the metadata still has to time the photo is created, but videos don't include that metadata. But since the creation time should the upload time instead of the creation time, I can not use this method to make sure I don't lost the creation time for my videos.
-
Mike commented
This is making Onedrive almost unusable for Bussiness Storage as many businesses need to search by a file date.....
-
Leif Hinterberger commented
Ryan, When will you give us an update regarding this fundamental "Content Created" Date Issue?
This is such a basis computer file management necessity and we can not use One Drive until you have this resolved. Please add this as a column option with no further delays.
Thank you. -
Mike commented
It is unacceptable for the reply to let the user set the date/time. The program Onedrive SHOULD retain the creation or last modified date and time of the file. That's just simple computer file management...
-
Leif Hinterberger commented
Ryan, Please will you give me a status on API Code that I believe you are working on regarding Content Created Date issue. The issue that ONE Drive rewrites all the documents dates and we are not able to query by the most important "Content Date" is a deal breaker for using ONE Drive and we have been waiting for this fix. Any information you have regarding how to make sure we can start to use ONE Drive would be most appreciated. Thank you.
-
Anonymous commented
966567495035
-
Darryl Tam commented
(Deleted my original comment and reposting with modifications)
It looks like the official Windows and Mac clients are able to set the last modified time on OneDrive, though apparently not the creation time. However, this information appears to only be viewable through the Desktop/Web clients and not the API. The lastModifiedDateTime Item resource property doesn't seem to match the modified times from the Web and Desktop clients.
-
Raimund Popp commented
as described, it should be possible to set LastModifiedDateTime for Files
ODItem.LastModifiedDateTime = objFile.LastWriteTimeUtc;
-
Bob Triffles commented
Thanks for the response, Ryan. I would also suggest making the creation timestamp writeable for applications such as file backup and synchronization. It's not as common as changing the modification timestamp, but I imagine that the development work would be mostly shared for both timestamps.