Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(0.23.0 Alpha) Google Photos Timezone #532

Closed
nalsai opened this issue Nov 11, 2024 · 6 comments
Closed

(0.23.0 Alpha) Google Photos Timezone #532

nalsai opened this issue Nov 11, 2024 · 6 comments

Comments

@nalsai
Copy link

nalsai commented Nov 11, 2024

When importing from Google Photos immich-go uses my local timezone since the json files don't include that information.
I would want it to try to get the timezone from the exif data of the image and fall back to using UTC if it can't find it in there. I have photos from many different timezones so using my local timezone is not possible and seperating them all manually would be a lot of work, especially because of daylight saving time.

In case you need an example file: This was shot at 2024-07-29 04:45 AM GMT+9 as seen in the exif data but gets imported as 2024-07-28 09:45 PM GMT+2 from Google Photos Takeout using the latest alpha (v0.23.0-alpha5) of immich-go.

YGT17107

@simulot
Copy link
Owner

simulot commented Nov 11, 2024

Thank you for chasing the bugs with me! 😃

Immich does the right thing, I don't know exactly how:
image

Exiftool shows a "Date Time UTC" :

exiftool -time:all 384975057-c444dd2c-cc6d-4ab5-a2e6-6a91cf5dbf8a.jpg 
File Modification Date/Time     : 2024:11:11 16:37:56+01:00
File Access Date/Time           : 2024:11:11 16:37:59+01:00
File Inode Change Date/Time     : 2024:11:11 16:37:56+01:00
Modify Date                     : 2024:07:29 04:45:07
Date/Time Original              : 2024:07:29 04:45:07
Create Date                     : 2024:07:29 04:45:07
Offset Time                     :    :
Offset Time Original            :    :
Offset Time Digitized           :    :
Date Time UTC                   : 2024:07:28 19:47:07

This value is buried in Olympus specific part of the Exif data, accessible with exif tool.

This alpha version of immich-go can leverage exiftool for retrieving exif data with the flag --exiftool-enabled.

I have modified my code to use the Olympus specific exif tag. --exiftool-enabled catches now the correct time, and it should be displayed correctly on your system.

I don't know when I'll release the next version. But I can share it directly with you.
Let me know what machine architecture you are using? (windows / mac / linux).

@nalsai
Copy link
Author

nalsai commented Nov 11, 2024

Thank you for the quick response, I'm using Linux

@simulot
Copy link
Owner

simulot commented Nov 11, 2024

This is probably linked to the #533 issue.
Could you share the JSON file linked to this photo?
I'd like to verify if the fix for #353 works also in that case.

@nalsai
Copy link
Author

nalsai commented Nov 12, 2024

Here's a zip file with the image and its json file
YGT17107.zip

@simulot
Copy link
Owner

simulot commented Nov 13, 2024

Thank, it works too:

date
Thu Nov 14 05:01:25 AM JST 2024
 ./immich-go upload from-google-photos -s=http://localhost:2283 -k=XXXXXX YGT17107.zip

image

@simulot
Copy link
Owner

simulot commented Dec 1, 2024

Fixed with v0.23.RC

@simulot simulot closed this as completed Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants