Photos image and movie sorting
I tested macOS 13 Ventura Photos.app image and movie sorting. Photos.app prioritizes sorting images and movies in this order:
1. ExifIFD:DateTimeOriginal & ExifIFD:OffsetTime* (images) and Keys:CreationDate timezone (movies)
2. GPS location's timezone (images and movies)
3. ExifIFD:DateTimeOriginal (images) and QuickTime:CreateDate (movies)
4. MacOS:FileCreateDate (images and movies)
So in other words:
1. If there is ExifIFD:OffsetTime* in .jpg or Keys:CreationDate timezone in movie, and GPS location -> Photos sets the timezone from the OffsetTime* and timezone, and sorts files based on them.
2. If there is no ExifIFD:OffsetTime* in .jpg or Keys:CreationDate timezone in movie and GPS location -> Photos sets the timezone from the GPS location, and sorts files based on that.
3. If there is no ExifIFD:OffsetTime* in .jpg and no Keys:CreationDate in movie, and no GPS location -> Photos sets the timezone from the computer's timezone setting, and sorts files based on that.
4. If there is no other metadata in an image or movie -> as a last resort Photos.app gets the date from the file creation date MacOS:FileCreateDate.
The relevant tags for sorting are (excluding FileName to which I always add the date. Notice that exiftool creates those Composite tags on-the-fly from the actual GPS tags -- they are just a nice compact way to present them here):
[System] FileName : 2013-1014-1608-05.jpg
[MacOS] FileCreateDate : 2013:10:14 16:08:05+03:00
[ExifIFD] DateTimeOriginal : 2013:10:14 16:08:05
[ExifIFD] OffsetTime : -08:00
[ExifIFD] OffsetTimeOriginal : -08:00
[ExifIFD] OffsetTimeDigitized : -08:00
[Composite] GPSPosition : 51.51262 -0.13342
[System] FileName : 2013-1014-1608-11.mov
[MacOS] FileCreateDate : 2013:10:14 16:08:11+03:00
[Keys] CreationDate : 2013:10:14 16:08:11-08:00
[QuickTime] CreateDate : 2013:10:14 16:08:11+03:00
[Composite] GPSPosition : 51.51262 -0.13342
GraphicConverter 12.0.1 can edit all those tags so it can be used to troubleshoot and fix incorrectly sorted files.