summaryrefslogtreecommitdiffstats
path: root/apps/dav/src
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2023-01-04 17:32:23 +0100
committernextcloud-command <nextcloud-command@users.noreply.github.com>2023-01-04 17:40:40 +0000
commitab6e7d33f82880174490b507378c7bf4bd2998e6 (patch)
tree8fa659b7e66925d326bed9da4600cf2956ef7dba /apps/dav/src
parente235c6438c5013bf81ee34d283b8aea43305400f (diff)
downloadnextcloud-server-ab6e7d33f82880174490b507378c7bf4bd2998e6.tar.gz
nextcloud-server-ab6e7d33f82880174490b507378c7bf4bd2998e6.zip
Remove jstz usage from server
Every proper browser has this kind of data now, with more up-to-date data than what's inside this package, which hasn't been updated in 3 years. https://github.com/pellepim/jstimezonedetect/issues/6 https://github.com/pellepim/jstimezonedetect/issues/9 Signed-off-by: Thomas Citharel <tcit@tcit.fr> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/dav/src')
-rw-r--r--apps/dav/src/views/Availability.vue4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/dav/src/views/Availability.vue b/apps/dav/src/views/Availability.vue
index 4a66dc383c2..e0128a59e0a 100644
--- a/apps/dav/src/views/Availability.vue
+++ b/apps/dav/src/views/Availability.vue
@@ -52,7 +52,6 @@ import {
enableUserStatusAutomation,
disableUserStatusAutomation,
} from '../service/PreferenceService'
-import jstz from 'jstimezonedetect'
import NcButton from '@nextcloud/vue/dist/Components/NcButton'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch'
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection'
@@ -69,8 +68,7 @@ export default {
},
data() {
// Try to determine the current timezone, and fall back to UTC otherwise
- const defaultTimezone = jstz.determine()
- const defaultTimezoneId = defaultTimezone ? defaultTimezone.name() : 'UTC'
+ const defaultTimezoneId = (new Intl.DateTimeFormat())?.resolvedOptions()?.timeZone ?? 'UTC'
return {
loading: true,