Skip to content

feat(web): seconds in timestamps #20337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web/src/lib/components/asset-viewer/detail-panel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
weekday: 'short',
hour: 'numeric',
minute: '2-digit',
second: '2-digit',
timeZoneName: timeZone ? 'longOffset' : undefined,
},
{ locale: $locale },
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/components/elements/date-input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@
}
onkeydown?.(e);
}}
step={1}
/>
4 changes: 2 additions & 2 deletions web/src/lib/components/shared-components/change-date.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

const userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;

let selectedDate = $state(initialDate.toFormat("yyyy-MM-dd'T'HH:mm"));
let selectedDate = $state(initialDate.toFormat("yyyy-MM-dd'T'HH:mm:ss"));
// Use a fixed modern date to calculate stable timezone offsets for the list
// This ensures that the offsets shown in the combobox are always current,
// regardless of the historical date selected by the user.
Expand All @@ -107,7 +107,7 @@
const { offsetMinutes, offsetFormat: zoneOffsetAtDate } = getModernOffsetForZoneAndDate(zone, date);
// For validity, we still need to check if the exact date/time exists in the *original* timezone (for gaps/overlaps).
const dateForValidity = DateTime.fromISO(date, { zone });
const valid = dateForValidity.isValid && date === dateForValidity.toFormat("yyyy-MM-dd'T'HH:mm");
const valid = dateForValidity.isValid && date === dateForValidity.toFormat("yyyy-MM-dd'T'HH:mm:ss");
return {
value: zone,
offsetMinutes,
Expand Down
Loading