mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
fix(settings): clock format "auto" follows the app's UI language (#758)
Auto previously passed `undefined` to `toLocaleTimeString`, which falls back to the JS engine's default locale. Inside WebKitGTK that resolves to `en-US` for many users regardless of `LC_TIME`, so the queue ETA and sleep-timer preview rendered 12h AM/PM even when the OS clock was 24h. Pass `i18n.language` instead, matching the convention already used in the theme-scheduler hour picker (AppearanceTab.tsx). Explicit 12h/24h choices still override.
This commit is contained in:
committed by
GitHub
parent
33ffb94083
commit
8ac5a69a7c
@@ -46,7 +46,7 @@ export interface PlaybackDelayModalProps {
|
||||
}
|
||||
|
||||
export default function PlaybackDelayModal({ open, onClose, anchorRef }: PlaybackDelayModalProps) {
|
||||
const { t } = useTranslation();
|
||||
const { t, i18n } = useTranslation();
|
||||
const {
|
||||
isPlaying,
|
||||
currentTrack,
|
||||
@@ -157,7 +157,7 @@ export default function PlaybackDelayModal({ open, onClose, anchorRef }: Playbac
|
||||
const clockFormat = useAuthStore(s => s.clockFormat);
|
||||
const previewSeconds = hoverSeconds ?? customSeconds;
|
||||
const previewAtMs = previewSeconds != null ? nowTick + previewSeconds * 1000 : null;
|
||||
const previewClock = previewAtMs != null ? formatClockTime(previewAtMs, clockFormat) : null;
|
||||
const previewClock = previewAtMs != null ? formatClockTime(previewAtMs, clockFormat, i18n.language) : null;
|
||||
|
||||
if (!open) return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user