"Fix Date Taken value" ignores OffsetTimeOriginal

Aperta Adatta ai principianti
#1,213 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
android, kotlin
Ambito
mobile

Direzione di ricerca

Inizia individuando fixDateTaken() e l’analisi delle date EXIF che utilizza, quindi verifica come vengono letti TAG_OFFSET_TIME_ORIGINAL e il valore di ripiego TAG_OFFSET_TIME. Confronta la data analizzata con DATE_TAKEN di MediaProvider per un’immagine con un offset e verifica che le immagini senza offset mantengano il comportamento attuale. Il lavoro è completato quando la data salvata corrisponde alla data EXIF nel relativo offset indicato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug needs triage
Checklist
  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.
Affected app version

1.14.1

Affected Android/Custom ROM version

Android 17

Affected device model

Pixel 7

How did you install the app?

Google Play Store

Steps to reproduce the bug
  1. Take a photo with DateTimeOriginal and OffsetTimeOriginal set, in a time zone different from the device's current one.
  2. Select it, More options > Fix Date Taken value.
  3. Sort by date taken together with videos or photos from the same time.
Expected behavior

If OffsetTimeOriginal is present, date taken is DateTimeOriginal in that offset, the same value MediaProvider stores in DATE_TAKEN.

Actual behavior

fixDateTaken() parses DateTimeOriginal in the device time zone and ignores the offset. The photo is shifted by the difference between the two zones and the wrong value is saved to date_takens, overriding MediaStore.

Screenshots/Screen recordings

No response

Additional information

Possible fix: read TAG_OFFSET_TIME_ORIGINAL (TAG_OFFSET_TIME when falling back to TAG_DATETIME) and set it as the formatter time zone when present. Files without an offset keep the current behavior.

Lingua principale
Kotlin
Stelle
3.8k
Fork
270
Merge medio
1g 2h
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FossifyOrg/Gallery

Tutte le issue di FossifyOrg/Gallery

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.