Closed p0n1 closed 12 months ago
I looked into it and it seems like the OffsetTimeOriginal
tag should be set properly, this should work for all photos then. As for QuickTime, the timestamps should always be stored in UTC, but I had to enable the quicktimeutc
API on ExifTool.
Thanks for sharing, let me know if you think there's still an issue.
Looks like a much better solution. Good to know that we can set OffsetTimeOriginal by setting SubSecDateTimeOriginal. Where did you find that?
Currently, standard
date.toISOString
is used forDateTimeOriginal
. https://github.com/garzj/google-photos-migrate/blob/97084ec170a152c79aa227351bdfe0027d7b6127/src/meta/apply-meta-file.ts#L35-L48This is how the ISO string looks like
2017-07-10T13:55:11.000Z
. When thisUTC+0
stuff written into the exif tags, many photos of mine just got wrong time in Immich because it uses the following logics to detect timezone. Check https://immich.app/docs/FAQ#why-does-my-uploaded-photo-show-up-with-the-wrong-date-or-time-in-immich and https://github.com/photostructure/exiftool-vendored.js#dates. In my case, all photos just displayed as 8 hours (UTC+8) before the real time they taken.I fix this by converting the
timeTaken
into a ISOString with timezone like2017-07-10T21:55:11+08:00
. Just as in https://github.com/photostructure/exiftool-vendored.js/blob/6408b855b80fe322a8dda3f1c4807f1cc1333844/src/WriteTask.spec.ts#L216 and https://github.com/photostructure/exiftool-vendored.js/blob/6408b855b80fe322a8dda3f1c4807f1cc1333844/src/Tags.ts#L98.And here is how it look like now by run exiftool. The timezone
+08:00
is appended for videos but not for photos. Not sure why.But I think it is not a perfect solution because photos could be taken in different timezone. How I wish the
DateTimeOriginal
could accept unix timestamp!Here is what I have changed.