immich-go
immich-go copied to clipboard
for google photos, immich-go should prioritize GPS for timezone data , as immich does, and avoid creating unnecessary XMP sidecar
In this scenario, there is a photo.jpg and its supplemental-metadata.json. The photo has embedded GPS data.
When they are uploaded, immich-go helps immich create a XMP sidecar that contains the time like so, filling in timezone from system if necessary.
<rdf:Description rdf:about=''
xmlns:exif='http://ns.adobe.com/exif/1.0/'>
<exif:DateTimeOriginal>2016-12-16T16:53:35-06:00</exif:DateTimeOriginal>
</rdf:Description>
The XMP sidecar is unneccessary, as immich will infer the correct time with timezone from the embedded GPS data. Exiftool is also able to do this with its composite "GPSDateTime".
[ExifIFD] DateTimeOriginal : 2016:12:26 19:53:35
[Composite] GPSDateTime : 2016:12:27 00:53:22Z
[Composite] GPSPosition : 35 deg 0' 43.86" N, 82 deg 33' 59.03" W
immich-go should avoid creating superfluous XMP sidecars if at all possible.
When uploading from a takeout, Immich-go forces the date of capture with the date read on the JSON file which is UTC. The timezone is set to the TZ of the current user running immich-go. Changing anything on photo's metadata generates a XMP file. The date of capture can be forced by immich-go only when necessary.
However, the timezone can't easily inferred from the GPS position. Immich is using a library for this purpose.