Skip to content

MM: fix(photo-addon): use 24-hour time format in lightbox#342

Merged
mmattel merged 10 commits intomainfrom
mm-feat-photo-addon-24h-time
Mar 23, 2026
Merged

MM: fix(photo-addon): use 24-hour time format in lightbox#342
mmattel merged 10 commits intomainfrom
mm-feat-photo-addon-24h-time

Conversation

@mmattel
Copy link
Contributor

@mmattel mmattel commented Mar 7, 2026

References: #341 (fix(photo-addon): use 24-hour time format in lightbox)

This is the CI working version of the referenced PR (based on my request via Matrix).

@LukasHirt tested locally and works well

@mmattel mmattel requested a review from LukasHirt March 7, 2026 16:57
@mmattel mmattel force-pushed the mm-feat-photo-addon-24h-time branch from 5cfba80 to fe9b3ad Compare March 9, 2026 07:07
@mmattel mmattel enabled auto-merge March 9, 2026 07:07
hour: '2-digit',
minute: '2-digit'
minute: '2-digit',
hour12: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be dynamic depending on the selected locale? What if user uses locale that uses 12 hour format?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make this clear: by selected locale I mean the locale selected within oCIS in the accounts page and not the os/browser locale.

@mmattel mmattel force-pushed the mm-feat-photo-addon-24h-time branch 2 times, most recently from 1fce209 to 6ed95fd Compare March 16, 2026 08:18
paul43210 added a commit to paul43210/web-extensions that referenced this pull request Mar 16, 2026
Remove hardcoded hour12: false from formatExifDate — the oCIS user
locale already determines the appropriate time format (e.g., en-US
uses 12h, de uses 24h). Addresses Lukas's review on owncloud#342.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
paul43210 and others added 3 commits March 17, 2026 16:31
Use hour12: false in toLocaleDateString() so the "Date Taken" field
in the lightbox shows 14:30 instead of 2:30 PM. AM/PM notation is
US-centric and confusing for international users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Several date formatting calls in PhotosView and usePhotos were using
browser default locale (undefined) instead of the oCIS user's preferred
language. Now consistently uses getUserLocale() from useTranslations
for timeline group labels (week ranges, month names, full dates).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove hardcoded hour12: false from formatExifDate — the oCIS user
locale already determines the appropriate time format (e.g., en-US
uses 12h, de uses 24h). Addresses Lukas's review on #342.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mmattel mmattel force-pushed the mm-feat-photo-addon-24h-time branch from e3df511 to b0b021f Compare March 18, 2026 09:10
paul43210 and others added 5 commits March 18, 2026 21:21
toLocaleDateString handles time options (hour, minute) inconsistently
across browsers — in EN locale it showed "13:56 PM" instead of
"1:56 PM". Switch to toLocaleString which correctly handles both
date and time formatting per the oCIS user locale.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use hour12: false in toLocaleDateString() so the "Date Taken" field
in the lightbox shows 14:30 instead of 2:30 PM. AM/PM notation is
US-centric and confusing for international users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Several date formatting calls in PhotosView and usePhotos were using
browser default locale (undefined) instead of the oCIS user's preferred
language. Now consistently uses getUserLocale() from useTranslations
for timeline group labels (week ranges, month names, full dates).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove hardcoded hour12: false from formatExifDate — the oCIS user
locale already determines the appropriate time format (e.g., en-US
uses 12h, de uses 24h). Addresses Lukas's review on #342.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
toLocaleDateString handles time options (hour, minute) inconsistently
across browsers — in EN locale it showed "13:56 PM" instead of
"1:56 PM". Switch to toLocaleString which correctly handles both
date and time formatting per the oCIS user locale.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mmattel mmattel force-pushed the mm-feat-photo-addon-24h-time branch from b0b021f to 38e5c76 Compare March 19, 2026 07:58
paul43210 and others added 2 commits March 19, 2026 20:54
The tooltip previously implied the filter checked for any EXIF metadata
(camera, model, location, etc.), but it actually filters by EXIF date
(takenDateTime). Updated tooltip to accurately describe the behavior
and explain that EXIF date is required for timeline placement, just as
EXIF location is required for map view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mmattel mmattel merged commit 8fffd2b into main Mar 23, 2026
2 checks passed
@mmattel mmattel deleted the mm-feat-photo-addon-24h-time branch March 23, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants