WebDAV Connection Creation/Modification Date Incorrect

I am using odrive to connect over WebDAV to my file server. There are already many files in the server with creation/modification dates going back years. The dates reflect what I would expect when I view the files through a mapped network drive on windows.

However, when I connect using odrive, the dates on the placeholder files reflect the date that I first connected the drive to my account (which I would expect), but when I sync the files with my local computer, they show the sync date as the modified date instead of the file’s actual mod date.

The mod dates update as I access files through odrive, but I am essentially losing all of the historical date metadata during the sync. Are there some settings that I should be using to show the file’s actual dates? Should my WebDAV connection be sending different information? Looking for any suggestions because it is important to be able to see the correct corresponding dates for each file once synced.

Hi @mcdonaldmike68,
odrive should be showing you the modified dates on files already on your WebDAV server (this will be files only, not folders).

New uploads from your system to the WebDAV server will, unfortunately, carry the upload time as the modification time, instead of the original time, as it exists on your local system.

There isn’t a sure-fire way to do this in WebDAV. We had early attempts trying to use PROPPATCH as a secondary call after the file PUT, but it had compatibility and support issues, so it was removed.

Hey Tony,

Thanks for the quick response. Please see the below screenshot. Odrive is on the left and a mapped network drive is on the right to the same WebDAV connection. I created the connection (9:54 AM) this morning and synced the file (9:55 AM) directly after that and the date created/modified are showing as such. On the right, my direct WedDAV connection is showing a creation date of 1/10/2017 and a modification date of later the same day.

Based on your above response, this file should be showing the exact same dates since it has been synced, but the Odrive connection is showing the dates that I synced the file.

Hi @mcdonaldmike68,
Do you know what WebDAV server is being used on the backend? For modtime we are just reading the modtime recorded on the object within WebDAV (the getlastmodified property).

If the file you are showing here was uploaded to the storage a while ago, then it should be showing a previous time, as recorded on the object and reported by the WebDAV server, unless getlastmodified is not reporting the correct information, or is not being returned.

Hey Tony,

We built our own WebDAV server and are hosting it ourselves. I have attached a text file detailing your PROPFIND request and our response for that particular folder and the GET request and response for that particular file. Is there something else that we should be sending?

I un-synced the drive and then synced it again before running a trace, so the dates are from today, and the PROPFIND response includes the correct Date/Time from January. I can provide a full trace if necessary.

Odrive_WebDAV_Trace.txt (3.6 KB)

Hi @mcdonaldmike68,
Are you able to create a test account and send me the credentials over PM? I can take a closer look.

Hey Tony,

I feel dumb for asking this, but I cannot figure out how to PM you on this forum.

Hi @mcdonaldmike68

You can PM him directly by clicking on his username and selecting “Message”
37 AM

@ericodrive,
Thanks, that would make sense, but I don’t have that option…
image

@mcdonaldmike68

Oh, well there’s your problem! Odd… Try clicking on the “M” at the top right, then hit the envelope and you should be able to create a new message from there, just start typing “Tony” in the to field and it should autocomplete to Tony @ odrive.

Quick question: is that message option there when you click on my name? If not let me know and I’ll PM you directly so we can get the creds over to Tony!

@ericodrive,

Unfortunately, I still don’t see an option from my messages page or by clicking on your name:

Please go ahead and PM me and I’ll send over the login information.

Hi @mcdonaldmike68,
I checked this out and it looks like the issue is that your WebDAV server is returning getlastmodified as defined by RFC 3339, but we are expecting it as defined in RFC 2616, as per the WebDAV spec (https://tools.ietf.org/html/rfc4918#section-15.7).

WebDAV is confusing in this way. creationdate is defined by RFC 3339 (ISO8601) (https://tools.ietf.org/html/rfc4918#section-15.1), but getlastmodified is defined differently (I believe this is due to legacy compatibility with HTTP headers).

Since the format is not what we are expecting, we aren’t processing it. Do you know anything about the implementation choices for your server?

Hey Tony,

I have passed your feedback onto the developer who manages the WebDAV server and code and it sounds like this is something that he will be able to change and test this week. Thanks!

Question though, if we are returning creationdate in the correct format, should that not be displaying correctly? I understand that if the getlastmodified is in the incorrect format, you would not accept it, but I would assume that you could still show the creation date correctly? Or does it reject both dates if one is incorrectly formatted?

Hi @mcdonaldmike68,
Thanks for the follow-up.
odrive doesn’t process creationdate. It only uses getlastmodified.

@Tony,

Great, thanks. So we were able to apply the fix to a demo environment. Now, before I sync a file or folder, the date shows the correct mod date. When I sync a file the date remains correct, however, when I sync a folder, the date changes from the correct date to the date/time I synced the folder.

I would assume that this is due to the folder actually being created instead of being a placeholder, but am confused as to why it doesn’t retain the correct date. See the below screenshots of before syncing a folder and after syncing.

image
image

Hi @mcdonaldmike68,
That’s great that your dev was able to make the change!

For the folders, odrive doesn’t modify the modtime on the local folders like it does on files. This was a design decision made to facilitate some internal sync engine requirements, so it is a gap in reflection compared to files.

Ya, easy changes are great! Thanks for all of your help diagnosing this issue.

We love your product and recommend it to all of our clients that we host documents for. I understand that this was a design decision, but does your team have any intention of re-designing/changing this so that the folders show the correct date as well? I ask because it may be a sticking point for some of our clients and I would like to be able to tell them what your plans are.

Hi @mcdonaldmike68,
I submitted a request for this, but I don’t know if/when it could be implemented. I will certainly update you if it it is given a green light, though.

Thanks for the follow-up!