[TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

[TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Post by *andry81 »

Windows Media Audio 2 plugin v1.4

Have found that the change time (not creation time) of a file on an MTP device (android phone) after a copy is wrong and shifted back on 6 hours for each file. If try to copy through the Windows Explorer then the time is correct (the same).

The Shift-F2 functionality (Compare Panels) rely on that and so does not work correctly and selecting random files. Can you fix that?
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Post by *petermad »

I can confirm that - but only a shift back of 2 hours for files outside the daylight saving time period, and 4 hours for files within the daylight saving time period.

If I copy via the virtual drive (drive bar button u1) then I see no shift back outside the daylight saving time period, and 1 hour shift forward within the daylight saving time period. That is the same that I see if I copy with Windows Explorer.

This is with NewTimeZoneMethod=0

With NewTimeZoneMethod=1 I see
If I copy with Media Audio 2 I see a shift back of 2 hours for files outside the daylight saving time period, and 4 hours for files within the daylight saving time period - that is same as with NewTimeZoneMethod=0
If I copy via the virtual drive (drive bar button u1) then I see no shift of the time for neither files in or outside of the daylight saving time period.

Testet on Windows 7 and 10 with Samsung Galaxy S20 with Android 11.

NOTE. If I copy the files from my Windows 7 PC to the phone and then connect the phone to my Windows 10 PC then the dates for all copied files show the date and time it was when I copied the files. Same if I start on my Windows 10 PC.

EDIT: Actually the same thing happen using one computer - If you disconnect the phone and connect it again - then the files will show the date and time when it was just copied, not their original dates.

So that just shows that file times on an Android phone is higly unreliable.
Last edited by petermad on 2021-03-15, 21:51 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Post by *ghisler(Author) »

There is no standard how MTP devices handle the time sent to them - some seem to need UTC, some local time, and some don't handle time changes at all. :(
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Post by *petermad »

2ghisler(Author)

What could be the reason that the file dates seem to be copied correctly when copying from Windows (with TC, TC plugin or Explorer), but when the phone is disconnected and reconnected the date of the file is the time that were current when the file was copied? And is this just a Samsung thing or does other experience it on other phone brands?
Last edited by petermad on 2021-03-15, 18:10 UTC, edited 2 times in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Post by *ghisler(Author) »

Most Android devices do this: They store that date in the media database, but do not write it to the actual file system. Explorer (and TC) only sees the media database when browsing Android devices.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Post by *petermad »

I just tried it on my older HTC One phone with Android 6, Here a file from yesterday is copied with a one hour setback of the time, but it stays that way after disconnecting and reconnecting the phone.

Then I tried with my wifes Huawei Honor 7 phone also with Android 6, and here a file copied from Windows to the phone always shows up with the time that was current when copying, not the original timestamp.

So that seem to prove that it is not an Android version issue but a phone brand issue how file time is handled, since none of my 3 Android phones handles it the same way.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

Re: [TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Post by *andry81 »

So that seem to prove that it is not an Android version issue but a phone brand issue how file time is handled, since none of my 3 Android phones handles it the same way.
May be add an option to shift the time back for a specific phone? For example, support a list with recently connected phones and option for each phone to correct the time?
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Post by *petermad »

May be add an option to shift the time back for a specific phone? For example, support a list with recently connected phones and option for each phone to correct the time?
That might not even do it - on my Samsung Galaxy S20 the date is correct just after copying - but changes after reconnecting the phone.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
andry81
Junior Member
Junior Member
Posts: 97
Joined: 2018-11-22, 19:17 UTC

Re: [TC9.51] Windows Media Audio 2 plugin wrong time after copy to MTP device

Post by *andry81 »

petermad wrote: 2021-03-15, 21:54 UTC [That might not even do it - on my Samsung Galaxy S20 the date is correct just after copying - but changes after reconnecting the phone.
It still resolvable: add checkbox to shift on next connection.
Post Reply