mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Metadata: Use creation time from Google Photos JSON sidecar file #1356
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#1356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @graciousgrey on GitHub (Mar 11, 2022).
Originally assigned to: @lastzero, @abheekda1 on GitHub.
As a Google Photos user who has updated the capture time/date, I would like PhotoPrism to import the corrected date from the GPhotos JSON sidecar files instead of the (possibly incorrect) original exif date.
Implementation requires further investigation:
Acceptance Criteria:
photoTakenTimefrom Google Photos JSON files MUST be prioritized over data found directly in Exif file headers@abheekda1 commented on GitHub (Mar 19, 2022):
Since it seems nobody has yet taken a look at this I'd be happy to give it a shot, how would I go about implementing this? I took a look at the metadata scripts and they seem pretty straightforward, just not sure how to make it so it prioritizes one over the other.
@lastzero commented on GitHub (Mar 25, 2022):
Do we have an example file for testing? Our parser currently reads the time from
photoTakenTime, notphotoTakenAt.@lastzero commented on GitHub (Mar 25, 2022):
@ADawesomeguy You (and others) are welcome to do research and document the results so we can implement this! Changing the code is quite easy, just checked it - but we need to avoid creating a mess with inconsistent data for everyone. Testing in our users' production environments is not an option.
@lastzero commented on GitHub (Mar 25, 2022):
See also:
@abheekda1 commented on GitHub (Mar 26, 2022):
Awesome, thanks for the info! I'll definitely take a look when I have time.
@jacobwhall commented on GitHub (Jun 16, 2022):
this README has some info about Google Takeout exports that might be helpful
@abheekda1 commented on GitHub (Jun 16, 2022):
It's been a while but I'll give this a shot. If anyone else wants to step in and give it a look at some point that would be cool too.
@abheekda1 commented on GitHub (Jul 24, 2022):
Alright I've delved a bit deeper and was wondering where exactly the code is that I should change? In addition, would this be a frontend modification (changing the displayed date) or a backend modification (changing the metadata) or something else?
@jrstrunk commented on GitHub (Jun 29, 2023):
I want to add a note of consideration here: please do not store the photo time in UTC as Google Photos provides it.
As a user, the original timezone of the photo is very important information because in most cases I just want to know the time of the photo in the local time it was taken. If I take a trip abroad and take photos, I do NOT want those photos' times to be stored in UTC. When I look at the photos, I want to see "Taken at 7:09pm" (the time in the abroad timezone the photo was taken in), NOT "Taken at 4:09am" (the time the photo was taken in, stored in UTC).
Since Google Photos stores photo times in UTC, we should first get the local offset of the photo time via the
OffsetTimeOriginalEXIF tag, convert Google Photo's UTC time to be in the local timezone of the photo, and then store that localized time.In the absence of a time offset in a photo that has datetime metadata, I think we should disregard Google Photo's UTC time because using it would mean no way of getting back to the local time the photo was taken it, which will result in a "wrong" photo time to the user who just cares about seeing the photo time in the timezone it was taken.
In the absence of any temporal photo data at all (if not in the metadata, maybe in the file name), I suppose the best we can do is just go ahead and use Google Photo's UTC time.
Edit: actually I think now I see that in the scope of this issue, we are not talking about ever writing to the file itself, but instead writing to wherever PhotoPrism stores metadata. I have updated the message body to reflect this realization.
@jrstrunk commented on GitHub (Jun 30, 2023):
Here is some data that may help with testing: