The algorithm mentioned How does PhotoStructure capture captured-at? | PhotoStructure is not actually working.
For some scanned photos which I don’t know the date I set date to be 1/1/1904. I chose this date because that’s the default data for mp4 video files without corresponding metadata. So 1/1/1904 is a magic value to represent an unknown date in my photo collection.
But PhotoStructure shows it as Jan 4, 2021, 12:50 PM which indeed is one of values from the exif tags but it contradicts to the the statement from the link above
The oldest “valid date” wins.
Expected Behavior
Photo date should be Jan 1, 1904, 12:00 PM
Current Behavior
Photo date is shown as Jan 4, 2021, 12:50 PM
Steps to Reproduce
Add file mentioned above to the PhotoStructure library
Look at Captured at metadata
Environment
Operating system and version: Windows 10
PhotoStructure edition: PhotoStructure for Desktop
The tzoffsetMinutes is coming from the TZ lookup based on GPS Latitude/Longitude, and it turns out that the UTC +2:02:04 offset for that time period is correct!
This causes the date fields that you set (correctly) to be ignored, as PhotoStructure thinks (incorrectly) that they’re invalid because the tzoffsetMinutes seems to be invalid.
I’m a bit of a time conversion/date conversion aficionado it terms of it seems I’ve spent more than my share of time programming around edge cases.
With that said, I’ve never seen this conversion… very interesting:-)
Thanks to @mnaoumov for reporting this issue. Apologies for the delayed follow-up.
CapturedAt and timezone extraction have been substantially reworked since this report, both in PhotoStructure and in exiftool-vendored:
Timezone inference: GPS-based timezone inference, IPTC TimeCreated extraction, Nikon TimeZone encoding workaround, support for archaic and triple-deep IANA timezones (e.g. America/Indiana/Indianapolis), colon-less offsets, Unicode minus signs, and many edge-case fixes across dozens of releases.
Bad date filtering: Known-bogus dates like 2002:12:08 12:00:00 (a common Android bug) are filtered via the configurable badDates setting.
Filename date extraction: Expanded patterns for LG, dashcam, and action cameras.
Plausibility checks: Additional validation when DateTimeOriginal and CreateDate disagree.