How can I set a value as the client's time zone in Qwik without using useVisbleTask$.
I am trying to get the client's timezone, since everything is running in the serivdor I get the server's timezone, which is not the same as the client's.
Provisionally I have this solution, but Qwik in its documentation recommends not to use useVisibleTask$.
const timezone = useSignal(Intl.DateTimeFormat().resolvedOptions().timeZone)
const filtersMarkers = useStore<FiltersMarkerState>({
selectDayStream: startOfToday(),
status: undefined
})
useVisibleTask$(() => {
timezone.value = Intl.DateTimeFormat().resolvedOptions().timeZone
filtersMarkers.selectDayStream = utcToZonedTime(startOfToday(), timezone.value)
})
Does anyone know a solution?