diff --git a/scripts/install.sh b/scripts/install.sh index 11be9f6..29a7f26 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -91,6 +91,8 @@ if [ $? -ne 0 ]; then update-locale en_US.UTF-8 fi +localectl set-locale LC_TIME=en_US.UTF-8 + # Setup USB stick automount diff ./installer/config/11-automount.rules /etc/udev/rules.d/11-automount.rules >/dev/null if [ $? -ne 0 ]; then diff --git a/src/svelte-components/src/dialogs/SetTimeDialog.svelte b/src/svelte-components/src/dialogs/SetTimeDialog.svelte index ae963b5..23e41d1 100644 --- a/src/svelte-components/src/dialogs/SetTimeDialog.svelte +++ b/src/svelte-components/src/dialogs/SetTimeDialog.svelte @@ -115,9 +115,13 @@ const YY = year.toString().padStart(2, "0"); const MM = month.toString().padStart(2, "0"); const DD = day.toString().padStart(2, "0"); - const hh = hour.toString().padStart(2, "0"); + let hh = hour.toString().padStart(2, "0"); const mm = minute.toString().padStart(2, "0"); + if (Number(hour) < 12 && !am) { + hh = (hour + 12).toString().padStart(2, "0"); + } + await api.PUT("time", { datetime: `${YY}-${MM}-${DD} ${hh}:${mm}:00`, timezone: timezones[selectedTimezoneIndex].value,