Android and timestamp differences

I think this was raised here: Syncthing does not preserve file timestamps and later resolved.

But I have something similar happening recently. My cluster has three Linux laptops and a Raspberry PI3, as well as two Android devices running ST app 10.7, one is Android 6.0.1 (Nexus 7 2013)and the other Android 8.1.0 (Nexus 5X).

The laptops, PI and Nexus 5X all show the the same (correct) mtimes for synced files. The Nexus 7 show the time the changes were updated, mostly later than the correct mtime because it only updates when charging.

I noticed this after the recent problem with Android app 10.6 but I don’t know if it occurred before then.

ST seems to deal with file changes without complaint, and later mtimes on the Nexus 7 are not propagated to other devices. Checksums across devices agree.

Is this expected behaviour from the older Android version? All devices have default ST/ST app settings, including Ignore Permissions set.

Thanks

This is expected. Android doesn’t allow ST to change timestamps so the correct metadata is tracked in the database for syncing with other devices.

1 Like

@kluppy thanks for your quick response. I’m guessing Android 8.x has changed to comply with *nix timestamps.

1 Like

Where did you do the change? If on the Nexus, it’s clear that the mtime is correct. Where do you store the data on the Android devices. ST can set the mtime in it own dir in /storage/emulated/0/Android/data/...

@wweich Both Android devices have the shared folder at /storage/emulated/0/Techie/

To test, I placed a file with timestamp 6 July 2010 in the ‘Techie’ folder of the Raspberry PI, this was then synced to the Nexus 7 (Android 6.0.1) and the Nexus 5X (Android 8.1.0).

The Nexus 5x has the shared file timestamp correct at 6 July 2010, while the Nexus 7 has the timestamp at the time of sharing, 23 March 2018 (today in Australia).

1 Like

You’re right. I just tested on my Pixel and ST can set the mtime outside it’s own folder. Nice :slight_smile:

2 Likes

I didn’t know this, thanks.

On my Nexus 7 (Android 6.0.1) I’ve moved the synced folder to ST’s own location and mtimes are now correct. Even though ST corrects for this anomaly in other locations in Android < 8, it’s good to know the real mtimes of all synced files.

I didn’t know this had changed either.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.