Skip to content

Commit 77d78b5

Browse files
committed
fix(web): seconds in timestamps
1 parent ebd644e commit 77d78b5

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

web/src/lib/components/asset-viewer/detail-panel.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@
337337
weekday: 'short',
338338
hour: 'numeric',
339339
minute: '2-digit',
340+
second: '2-digit',
340341
timeZoneName: timeZone ? 'longOffset' : undefined,
341342
},
342343
{ locale: $locale },

web/src/lib/components/elements/date-input.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@
3434
}
3535
onkeydown?.(e);
3636
}}
37+
step={1}
3738
/>

web/src/lib/components/shared-components/change-date.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
6666
const userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
6767
68-
let selectedDate = $state(initialDate.toFormat("yyyy-MM-dd'T'HH:mm"));
68+
let selectedDate = $state(initialDate.toFormat("yyyy-MM-dd'T'HH:mm:ss"));
6969
// Use a fixed modern date to calculate stable timezone offsets for the list
7070
// This ensures that the offsets shown in the combobox are always current,
7171
// regardless of the historical date selected by the user.
@@ -80,7 +80,7 @@
8080
const { offsetMinutes, offsetFormat: zoneOffsetAtDate } = getModernOffsetForZoneAndDate(zone, date);
8181
// For validity, we still need to check if the exact date/time exists in the *original* timezone (for gaps/overlaps).
8282
const dateForValidity = DateTime.fromISO(date, { zone });
83-
const valid = dateForValidity.isValid && date === dateForValidity.toFormat("yyyy-MM-dd'T'HH:mm");
83+
const valid = dateForValidity.isValid && date === dateForValidity.toFormat("yyyy-MM-dd'T'HH:mm:ss");
8484
return {
8585
value: zone,
8686
offsetMinutes,

0 commit comments

Comments
 (0)