Skip to content

Import: date folders use UTC for photos without a capture time (file-date fallback); dialog says "today's date" #4483

Open

Description

@aurogallus

Environment

  • LightCraft 0.21.1, macOS 27.2 (26B123), time zone Europe/Berlin (CET, UTC+1)

Observed
I imported a macOS screenshot with Move, folder template By day (YYYY/YYYY-MM-DD). The screenshot was taken on 2026-11-17 at 00:26 local time, and its file name says so. LightCraft filed it under 2026/2026-11-16/, one day early. A HEIC from a phone, with an EXIF capture time, landed in the right folder.

Cause
The PNG has no capture time. It has an eXIf chunk with only the dimensions and the user comment "Screenshot", and an XMP packet with no date. So the import falls back to the file's own date (job.rs: "no date in the file or its sidecar: the file's own date, as Lightroom does"). That date comes from modified_iso in crates/engine/src/files/fs.rs, which calls crate::import::civil(secs). civil returns the date in UTC. The file's mtime is 2026-11-17 00:27:01 CET, which is 2026-11-16 23:27:01 UTC, so the folder becomes 2026-11-16.

Capture times from EXIF are taken as written (local wall clock), so files with a capture time are filed correctly. Files without one are filed in UTC. Anyone east of UTC loses a day for files changed shortly after midnight, and anyone west of UTC gains one late in the evening.

system_clock() in import/commit.rs has the same problem: its doc comment says "The current local time", but it calls the same UTC civil.

Mismatch with the UI and docs
The import dialog and docs/user/guides/import-photos.md say: "Folders and {date} use the capture time; a photo without one uses today's date." The code uses the file's modification date instead. The text is misleading either way.

Suggestions

  1. Convert the file-date fallback, and system_clock, to the local time zone before building YYYY-MM-DD. This is what Lightroom does with the file date.
  2. Correct the dialog text and the guide to say what happens.
  3. Feature request: an import option that files photos without a capture time under a separate, configurable folder (for example undated/) instead of a date folder. A date folder built from a file date looks like a real capture date but often isn't one, for example with a copy, a messenger download or a scan. A separate folder keeps those photos visible until someone dates them.

Activity

  1. ticket-craft commented on Nov 17, 2026

    @ticket-craft

    This is being worked on in #2381.

    Thanks! This ticket describes several separate problems:

    • Date folders use UTC for files without a capture time
    • Import dialog and guide misdescribe the undated-photo date
    • Option to file undated photos in a separate folder

    It helps a lot if each one has its own ticket, so they can be tracked and fixed separately.

    Possibly related: #2284 and #437.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions