mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Import Folder Structure to use Local time instead of UTC #2022
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#2022
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 @ricketyboo on GitHub (Jan 25, 2024).
Describe what problem this solves and why this would be valuable to many users
Importing files sorts into folders based on UTC: YYYY/MM/YYYY-MM-DD_HHMMSS_HASH.EXT. This is confusing on the boundary between days with timezones being considered as images can wind up in the wrong month and year.
Example from google Pixel phone. PXL_20231231_220232177.jpg taken on the morning of Jan 1st 2024, went "missing" because it was sorted into Dec 31st, 2023.
It correctly sees the UTC+11 offset, and doesn't change anything about what the file reports its local time as, but it sorts it by UTC+0 meaning this photo winds up in the "wrong" year and month folder structure. See also https://github.com/photoprism/photoprism/issues/4035.
I understand why we would choose to store the UTC in the filename, and in fact the attached pixel image has also done so, but I think when it comes to an organizational layout, people aren't going to be thinking about their lookup based on UTC/GMT, they'll be thinking about it based on the local time the image was taken.
Describe the solution you'd like
I'd suggest the folder these are sorted into should be based on the image's local time, not UTC. I have no strong opinion on whether the filename remains UTC or not.
Perhaps this is user configurable? https://github.com/photoprism/photoprism/issues/475 certainly touches on some of this. but I'm not sure is really the same feature request. I think the ability to change the directory structure is fundamentally different to an uncertainty on how we should populate the YYYY-MM in the current date based structure.
Describe alternatives you've considered
Not using the import tool and writing my own to process my import files into a photoprism like structure and naming, with the folder sorting based on local time. This would lose me the ability to quickly weed out duplicates and keep the originals folder only containing unique images, which was one of the main reasons I started using photoprism. Not really a great option!
Could also write a custom script to run over the originals folder with exiftool and reorganise them after an import, and then reindex, but this will be somewhat tedious!
Additional context
@masterwishx commented on GitHub (Mar 14, 2024):
any news on it ?
@Flaunder-D commented on GitHub (Mar 27, 2025):
Hi! I have the same problem. Has no one solved this problem?