Page 1 of 2

WebDav plugin displays wrong file time

Posted: 2012-11-08, 10:54 UTC
by lockpicking
Hello,
WebDav plugin displays the wrong file time.
For example I changed a file this morning at 11:22 and uploaded it to WebDav server.
Total commander displays that the file change time is 10:22. But others apps display the correct time (11:22). So the problem is on the side of Total Commander WebDav Plugin.

If I download the file, it is saved with the wrong time (10:22).

Is this a known bug and will be corrected in the next release?

Regards
lockpicking

Posted: 2012-11-08, 14:02 UTC
by ghisler(Author)
No, it's not a known problem - looks like a timezone problem. In which time zone are you?

Posted: 2012-11-08, 14:44 UTC
by lockpicking
Time zone Berlin (GMT +1)

Posted: 2012-11-12, 14:20 UTC
by ghisler(Author)
That would explain the 1 hour difference to GMT. The server probably sends the time in GMT and TC expects local time, or vice versa.

Posted: 2012-11-12, 14:31 UTC
by lockpicking
So, what can I do?
Or can you do something?

Posted: 2012-11-12, 14:39 UTC
by ghisler(Author)
I will have to analyze this in detail with a debugger, and add conversions if necessary. It would be helpful to get a raw directory list from the server. Do you use TC for Windows? It WebDAV plugin could save a raw directory list easily.

Posted: 2012-11-12, 15:03 UTC
by lockpicking
Yes, I use TC for Windows, but not with the WebDav-Plugin. I use Windows directly to get access to my WebDav folder.
But I do not know, what a raw directory list is.

Posted: 2012-11-12, 15:16 UTC
by lockpicking
Now I have installed the WebDav plugin.
Where can I find the raw directory list?

Posted: 2012-11-15, 14:15 UTC
by ghisler(Author)
1. Enable "Detailed log file" in the settings of a conntection (Alt+Enter)
2. Connect to the server
3. Go to a folder with a few files and folders inside
4. In the other panel go to the TEMP folder (you can use cd %temp% on the command line while the other panel is active)
5. There should be file dav*.tmp with * some random characters. This is the raw listing as sent by the server (xml).

The timestamps look like this:
<ns666:Win32LastModifiedTime>Thu, 03 Mar 2011 09:20:11 GMT</ns666:Win32LastModifiedTime>

Just post a few here.

Posted: 2012-11-15, 14:55 UTC
by lockpicking
Are you really right with your description?
It seems that your are talking about TotalCommander for Windows, but I have the problems with the WebDav plugin for TotalCommander for Android.

I have no Alt+Enter and no command line.

Posted: 2012-11-15, 15:02 UTC
by ghisler(Author)
As I wrote above, you can do this ONLY with Total Commander for Windows. You cannot get the raw listing from TC for Android. But since both will get the same raw listing, it doesn't matter where you get the listing.

Posted: 2012-12-06, 14:09 UTC
by lockpicking
With the last update the time is correct, but now the date is one month in future.

Posted: 2012-12-06, 14:48 UTC
by ghisler(Author)
I can confirm the problem: The function I use to make the time zone correction uses 0=January, 1= February, 2=March etc. instead of what you would expect (1=January, 2= February, 3=March). Unfortunately this wasn't mentioned in the Android docs...

Please try the following fix:
https://plugins.ghisler.com/aplg/tcandroidwebdav202.apk

Posted: 2012-12-06, 14:59 UTC
by lockpicking
Yes, the download helped. Thank you!

Posted: 2012-12-06, 15:04 UTC
by ghisler(Author)
Thanks, I will put it in the play store (this will usually take about an hour to go through).

Edit: Please download it again, I have added a try..catch exception handler to catch any exceptions due to invalid file timestamps.