Manually changing file modification time

Hi guys,

I hope you can help me with my problem.
The situation: File modification times for most of my photos do not match the photo date (time taken) provided by the camera (which is my fault for not taking care while copying). Therefore sorting by time makes no sense in the Files and Photos app, or in sync clients like on Android. The Memories app is the only one which supports sorting by photo date, but is not available for Android.
For test purposes I have changed the modification time of some photos before adding it to my nextcloud and it all works very well.
My question is now: Can I change the modification time of files when they are already in my nextcloud database? Or will it destroy syncing, i.e. does nextcloud use the modification time to identify the newer file?

I’m not aware of an app which allows you to run these kind of tasks on the server directly. I would try to use an external program on the console to rename the files and afterwards use the “occ files:scan” command to update the database Nextloud is using.

1 Like

Thank you for your answer. Yes, that would be my plan. However, my question is if an unexpected change of modification time would confuse nextcloud. E.g. syncing might rely on the file modification time to compare files with the client.