marcovezzale the upper sorting "changes" even when we edit something within a folder, and the DateTime doesn't seem to change.
Folders have one date "modified time", which is initially the date it gets created, but the date will also get updated when you update contents of the folder. This is how it works in desktop file browsers also.
It's not clear what you mean "upper sorting "changes"" and dateTime doesn't.
marcovezzale Does it refer to the CREATION date/time of the folder? or to the MODIFICATION date/time of the folder?
Modification time. It could be possible to change it and lock it to CREATED time, but this is not how it normally works in file browsers / viewers. If someone updates a gallery with 100 new images, it's normal that the date of the folder displays the date it was updated, not created.
marcovezzale To us, it seems inconsistent because sometimes it changes with no apparent reason: when we add a picture two levels down, or things like it.
Not quite sure about "no apparent reason", as that's not possible. Even if you browse the folder directly on the file system, you will see the same date as displayed in Files Gallery.
The date of a folder would not change if you add a picture two levels down, unless you are renaming parent folders in some way or other. A folder will only change date when it is renamed or files directly inside are added, removed or edited. If you are experiencing another cause, I would need to diagnose with a test scenario.
marcovezzale We would like to find a way to make it consistent - to have the date/time sorted always by something that we have control over. Thank you
The problem is that Files Gallery is not a CMS, but a file browser that will read all it's data from the file system. The date is therefore either folder "modified" or "created", and in neither case can you "control" them.
More extensive photo gallery apps (like our own photo.gallery) do support applying a custom date, which is stored in a data file or database like a CMS.