Bug: folders show a zero modified time (0001-01-01 00:00) on the S3 backend #76

Closed
opened 2026-07-30 03:29:44 +00:00 by Cordy · 0 comments
Owner

Dogfood finding (Nikola, 2026-07-30): every folder lists "0001-01-01 00:00" as Modified.

Cause: S3 has no real directories — the driver synthesises directory entries from CommonPrefixes, which carry no timestamp, so ModTime is the zero time.Time and the UI formats it literally. (POSIX is unaffected: real directories have real mtimes. The .249 dogfood is S3/Garage, hence the report.)

Nikola's question — creation time, or newest-content time? Newest content wins: it's what "Modified" means for a folder in every file manager, it's what people actually scan the column for, and unlike creation time it's derivable from data S3 already returns. Creation time isn't recoverable for a prefix at all.

Fix, two layers:

  1. S3 driver — when listing, derive each directory's ModTime from the newest LastModified among the objects under that prefix in the same response, so it reflects "when something in here last changed".
  2. Web UI — render a zero timestamp as "—" instead of a bogus year-1 date, so any backend that genuinely cannot report one degrades honestly.
Dogfood finding (Nikola, 2026-07-30): every folder lists "0001-01-01 00:00" as Modified. Cause: S3 has no real directories — the driver synthesises directory entries from `CommonPrefixes`, which carry no timestamp, so `ModTime` is the zero `time.Time` and the UI formats it literally. (POSIX is unaffected: real directories have real mtimes. The `.249` dogfood is S3/Garage, hence the report.) Nikola's question — creation time, or newest-content time? **Newest content wins**: it's what "Modified" means for a folder in every file manager, it's what people actually scan the column for, and unlike creation time it's derivable from data S3 already returns. Creation time isn't recoverable for a prefix at all. Fix, two layers: 1. **S3 driver** — when listing, derive each directory's `ModTime` from the newest `LastModified` among the objects under that prefix in the same response, so it reflects "when something in here last changed". 2. **Web UI** — render a zero timestamp as "—" instead of a bogus year-1 date, so any backend that genuinely cannot report one degrades honestly.
Cordy closed this issue 2026-07-30 04:05:28 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#76
No description provided.