Announcement

Collapse
No announcement yet.

Timezone problem BC between Windows and Android

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Timezone problem BC between Windows and Android

    The main reason for me to buy BC was to sync my photo's between my Windows and an SD card on my Android phone. My Windows is the main place, that's where I edit and manage them. I'm not interested in syncing the occasional pictures I take with the Android. My folders often also contain GPS tracks or a PDF describing the trip where the photos were taken

    I synced everything last year and all seemed fine. But now, the timezone was changed and BC flags many files as newer on the Android. It seems that BC cannot use the files' timestamps on the Android files. For the photos themselves it seems to use some other technique, because they are not flagged as "new on Android"

    For some folders (maybe 20 out of 200?), also JPGs are flagged as newer on Android. When looking at such a folder: 11 photos (out of 340) are supposed to be newer on Android. Quick Compare says these 11 are binary identical, and given the fact that these photos date from 2020 makes I'm sure I didn't change them on Windows.


  • #2

    Hello,

    What are the timestamps of the mtp device when viewed through other applications like Windows Explorer? From the screenshot, it appears like the phone updated all of the timestamps to a newer timestamp sometime after the transfer. Or would those timestamps be the time of the transfer last time?

    If the files report as binary equal, you can then set to Display Same (binary scanned files), then Expand All, and Select All Files (edit menu or toolbar). This leaves you with a selection of binary same files, shift+right to slide to the MTP device, and you can right-click Touch to then edit the timestamp (and re-set them to the origin side's older timestamp).
    Aaron P Scooter Software

    Comment


    • #3
      The timestamp on the files on the Android card in BC and Windows Explore look the same.
      My guess is that the timestamps are those of the upload time. Remark that they are all almost identical. On windows, after working on my photos I use ExifIO to set the windows timestamp back to the time the photos were taken. And map 202-07-09BE contains photos taken between July & september 2020. A timestamp 25/11/2021 most probably is the sync time in BC.

      S you say I can compare all files in a binary way (I do have 40000 photos... I don't know how many BC flags as different and that should be compared). If is's a onetime event, no problem, bt if I will have problems each timezone change ....

      Comment


      • #4
        Timezone changes usually manifest as whole hour changes. I'm not sure why a timezone or daylight savings change would have triggered this behavior; I'd have expected them to always report as Newer, given their assignment of time of transfer (of generally over a year newer).

        My hunch is that immediately after the transfer, perhaps they showed as the same timestamp, but this was a refresh listing error from the MTP device, and a full refresh would reveal the true timestamp was actually the time of the transfer?

        BC4 itself can edit the last modified timestamp of a selection using the Touch command. This can be an arbitrary edit (set to anything), or it can copy the timestamp from the other side. Test with a single file or a handful (dozen) files on the MTP device to see if it supports the Touch command, and verify it sets it in Explorer/Full Refresh in BC4 as well.
        The purpose of the binary scan is to verify the files are truly equal before updating the timestamp.

        I'm unsure if it's something you'd have to tackle again if it shifts again; we'd have to know why the timestamp on the android device is shifting (which appears to be external to BC4).
        Aaron P Scooter Software

        Comment


        • #5
          The reason why I thought about timezone: I noticed that it seemed to be hard to keep the timestamp when copying files from Windows to Android. I though that BC had some trick to rember what was copied, and that the trick stopped working with a timezone change.

          I just tried touch, with two photos. The first one was one dated 1978 (I already wrote that on Windows -where the master copy lives- I set the timestamp to the date the photo was taken. It failed, but I thought: maybe something doesn't like a date that old.
          So I went to another folder, with one JPG with a mismatch, and tried to set the date with Touch to "that of the other side". It failed too with the same error.
          Click image for larger version

Name:	Captured005.jpg
Views:	130
Size:	145.5 KB
ID:	87767

          Comment


          • #6
            I a folder with photos that were not yet coped onto the Android (a reason why I started looking at a global resync yesterday). So, I copied that folder onto the Android, and that folder now looks fine; BC displays the expected timestamps October 7. But, when I look with TotalCommand on the Android: all files have today's date, the same with Android's explorer like App. Maybe Android's filesystem has more than one timestamp field available and BC displays another than Andoid's explorer/TotalCommander.

            Before the copy
            Click image for larger version

Name:	Captured001.jpg
Views:	91
Size:	46.6 KB
ID:	87770

            After the copy, all looks fine for this new folder
            Click image for larger version

Name:	Captured002.jpg
Views:	88
Size:	101.1 KB
ID:	87771

            What Windows tells
            Click image for larger version

Name:	Captured003.jpg
Views:	153
Size:	40.1 KB
ID:	87769

            And what Android's TotalCommander displays, all dates are 5'th of April, the upload instance
            Click image for larger version

Name:	Screenshot_20220405-123338_Total_Commander[1].jpg
Views:	86
Size:	695.0 KB
ID:	87775

            I had an idea: I used Windows explorer to copy 2 extra files into the folder on Android:

            Click image for larger version

Name:	Captured006 (2).jpg
Views:	86
Size:	279.1 KB
ID:	87776

            Remark that Windows correctly copies the "modification" timestamp, but it also sets a Creation timestamp; the files copied with BC have none. Maybe Windows is storing that information into its own Registry and not in the Android Filesystem?
            Attached Files

            Comment


            • #7
              Hello,

              MTP devices don't technically mandate timestamps, so every device can decide to tackle them a little differently. I'm not surprised Touch fails, but was hoping it could be used. It is a little surprising to see a difference in behavior for the Creation date (which, is usually set to the new creation of a file on the destination; you can test with two local files and Explorer).

              One key thing to make sure of: on the initial transfer and the initial listing of the files, don't initially trust the timestamp displayed. While troubleshooting, I've seen some devices display the 'expected' value, but then lose it after a full refresh or double-checking in Explorer. It seems like you did double check in Explorer, but I can't explain why Total Commander could then differ. I might suggest throwing in a device reboot between verifications, to see if that somehow changes the timestamp value displayed in BC4, Explorer, or Total Commander.android.app.
              Aaron P Scooter Software

              Comment


              • #8
                I did indeed already restart BC to verify if after restart things looked fine. But I didn't reboot anything then.
                Now I rebooted my Android device, and the folder that was OK before, is now all bad, BC displays the copy date.

                So, is the conclusion that BC cannot be used to sync nicely between Windows and Android? So, that I spent money on BC for nothing? If so, BC's website should inform about this problem.

                I just remember: I once used an App on Android to set the timestamp for JPGs to the timestamp stored in the EXIF data. But, this app didn't work very well (I forgot the details, may too much manual work? too much for 40000 photos?). But, that can maybe explain that I do have some folders with photos where the timestamps match with Windows.

                Comment


                • #9
                  BC4 is using standard copy functions to copy information to the device over the MTP protocol. The steps I'm recommending aren't specific to BC4 troubleshooting, but troubleshooting various MTP devices (including Android) I've had experience with over the years. As a next step, if you copy a single file using Explorer as one test and the Command Line as another, how does the timestamp appear on the phone before and after a phone restart? While it's possible there's something specific to BC4's copy function, it's more likely an issue with the device's MTP implementation. But first we have to narrow down exactly how the problem manifests, which the device reboot exposed at least one more facet of that disconnecting and reconnecting the device didn't expose (which, is pretty weird).
                  Aaron P Scooter Software

                  Comment


                  • #10
                    And in case it helps, one strategy I've seen for Android devices specifically with bad MTP support (if that is what is happening here), is that some offer alternate connection methods as part of the Android OS (such as binding as a drive letter) or using an app to setup an FTP server on the device, which can also be remotely accessed with BC4.
                    Aaron P Scooter Software

                    Comment


                    • #11
                      > device reboot exposed at least one more facet of that disconnecting and reconnecting the device didn't expose (which, is pretty weird).
                      Up to now, I didn't test unplugging the phone, I only followed the suggestion of a reboot.

                      I copy a file both with Windows and BC to the phone's storage and to the SD-card
                      - Explorer and BC show timestamp as on Windows, both on Phone and SD-card
                      - Restart BC: timestamps still OK
                      - TotalCommander on Android: time = today, both on the SD-card and the Phone
                      Disconnect Android
                      - Explorer and BC show today as timestamp, both for SD-card and phone's storage

                      Th App that I did use once to set the timestamps of JPG's equal to the EXIF info, proves it is possible on Android to set the timestamp one wants (bu that obviously only works for files with Exif info, not for PDFs for example). So MTP is the culprit, or Android's MTP implementation?

                      Comment


                      • #12
                        A little of both. MTP doesn't require timestamps, so it is up to each device to implement their own methods of support. This can shift per device or per software version of device on If or How well they handle timestamps. Does your version of Android have the dropdown control in Settings to swap how it connects when plugged into USB? While this specific device appears to have timestamp issues reproducible with Explorer (right?), that is likely limited to its MTP support, and if Drive letter is a built-in option (or installing an FTP server app), these would likely work.

                        If Explorer is exhibiting the same behavior with a single sample file and test, then BC4 is going to run into the same issues.
                        Aaron P Scooter Software

                        Comment


                        • #13
                          I can change the USB connection type indeed. But, the setting page is made for dumb users, and allows me to select (I translate, my Android speaks Dutch)
                          • transfer files
                          • USB tethering
                          • MIDI
                          • transfer photos
                          • only charge battery
                          The first one will be MTP, the 4th PTP. I don't have other choices. (I've got Android 11)

                          You convinced me BC is not to blame here, BC is just misinforming me (just like Explorer). And that's again not a blame for BC. But, teh BC website should have a warning that one should check if with an MTP connection if the timestamps are preserved after breaking the connection.

                          Yesterday evening I restarted the Old APP that can fix dates for photos: "Image & Video Date Fixer". I also digged up the problem I had with it: the problem was indeed that it didn't work for subfolder, I'd have to do it folder by folder. It appear the bug was fixed now: yesterday thus the App had to scan of my 40K photos took 2 hours to find which filesystem dates didn't match with the Exif date. This morning I let it fix all mismatched dates (I didn't time it)

                          Now, for the future. BC supports FTP you say. I'm a retired IT man (worked on mainframes since 1978). From my past, I know that at least some FTP servers do no support maintaining the file timestamps. Do you happen know an Android FTP server App that does preserve file timestamps? (I already googled a bit, but I didn't find a single App yet that speaks about timestamps).

                          In the meantime: thanks for your quick help.

                          Comment


                          • #14
                            I'm afraid I'm not familiar with a specific Android FTP app; they shift a bit frequently and the one I was familiar with isn't one I'd recommend anymore. I also say "FTP" since BC4 Std supports FTP, but if you have Pro, I'd recommend SFTP.

                            What does "usb tethering" do? I don't have an Android device handy, but I think that might be presenting as a drive letter? Or is that only for acting as a network hotspot?

                            We do support the MTP protocol, and many devices work well with it (including making optional support to better handle file timestamps) as do transfers From the device as the Source. We could try to add some kind of 'supported' language or emphasize trying the Trial with your device, but it would be difficult to phrase as a warning and we heavily encourage trying the Trial first in all scenarios. I have a lot of experience troubleshooting these types of devices, but that's because I also see all of the support requests. That doesn't mean it is prevalent, just that I have a lot of experience.
                            Aaron P Scooter Software

                            Comment


                            • #15
                              Assigning a drive letter to my Android: I've been looking around a long time to find tricks. Because with a drive letter, ToalCommander or even my self written Photo database management program could to sync.
                              USB Tethering: when I activate that, my Android becomes a kind of router router and via Android's G4 phone network my laptop connect to the Internet. I can't miss that on locations where I want to use my laptop, but without access to a Wifi network.

                              Comment

                              Working...
                              X