Explicitly set locale to avoid hydration mismatch
Some functions in luxon default to the system's locale while other functions default to "en-US". Explicitly set the locale everywhere the luxon objects are created to avoid possible mismatches and unexpected behaviour should the system's locale be different.
This commit is contained in:
parent
e722876aae
commit
ed67982ec0
5 changed files with 31 additions and 31 deletions
|
@ -53,7 +53,7 @@ const { data: accounts } = await useAccounts();
|
|||
const idToAccount = computed(() => new Map(accounts.value?.map(a => [a.id, a])));
|
||||
|
||||
function formatTime(time: string) {
|
||||
return DateTime.fromISO(time, { zone: accountStore.activeTimezone }).toFormat("yyyy-LL-dd HH:mm");
|
||||
return DateTime.fromISO(time, { zone: accountStore.activeTimezone, locale: "en-US" }).toFormat("yyyy-LL-dd HH:mm");
|
||||
}
|
||||
|
||||
async function toggle(id: string, slotIds?: string[]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue