Syncthing does not preserve file timestamps

I just configured SymcThing to sync my entire internal phone memory (Android) to my server and desktop machines. The problem is it does not preserve file timestamps. So even if a photo file on the source from 2011, once it appears on the destination it has today’s date. This screws up many, many things.

Is this normal behaviour or am i doing something wrong?

Syncthing takes pains to preserve file timestamps - synchronization depends on it. Android on the other hand goes to great lengths to prevent us from at least setting timestamps, which we try to work around. Maybe Android won this round.

In short, no, not intended but Android is a bit of a special case unfortunately.

So is it not doable with syncthing?

I’ve never heard of this happening before, and we have lots of Android users, so I don’t know. But I do know Android likes playing tricks with the file system, including lying about the mtime, so this could be something new.

Read this bug report: https://github.com/syncthing/syncthing-android/issues/69

It’s not exactly the same problem you are having. I wanted timestamps generated off-Android to be preserved. I think you want timestamps generated on-Android to be preserved.

Bummer. A related question, then. Forgetting Android, will the file get updated on other machines if only the timestamp changes on it? I.e. will the updated timestamp get propagated throughout the participating machines?

Yes, timestamps are metadata, and metadata is synced, just like permissions.

I looked into this a while ago, and from my evernote:

TotalCommander - does file timestamps but not directory timestamps.

There’s also File Timestamp.

I’d be curious to know if these work for the OP, but not Syncthing.

Disclaimer: not an Android developer or user. But I followed the link and it says it requires root.

1 Like