From 8aabffd1e7beb7522a9320f06469e4bfda02a632 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Mon, 6 Oct 2025 18:33:57 +0200 Subject: [PATCH] fix race condition in UserTimezoneMismatchModal --- .../js/Components/Common/User/UserTimezoneMismatchModal.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/js/Components/Common/User/UserTimezoneMismatchModal.vue b/resources/js/Components/Common/User/UserTimezoneMismatchModal.vue index 091bbe52..85054955 100644 --- a/resources/js/Components/Common/User/UserTimezoneMismatchModal.vue +++ b/resources/js/Components/Common/User/UserTimezoneMismatchModal.vue @@ -27,9 +27,10 @@ onMounted(() => { timezone.value = Intl.DateTimeFormat().resolvedOptions().timeZone; userTimezone.value = getUserTimezone(); + const now = getDayJsInstance()(); + if ( - getDayJsInstance()().tz(timezone.value).format() !== - getDayJsInstance()().tz(userTimezone.value).format() && + now.tz(timezone.value).format() !== now.tz(userTimezone.value).format() && !hideTimezoneMismatchModal.value ) { show.value = true;