summaryrefslogtreecommitdiff
path: root/src/views/ProfileSettings/ProfileSettings.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/ProfileSettings/ProfileSettings.vue')
-rw-r--r--src/views/ProfileSettings/ProfileSettings.vue14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/views/ProfileSettings/ProfileSettings.vue b/src/views/ProfileSettings/ProfileSettings.vue
index 81ea7b67..dee8d399 100644
--- a/src/views/ProfileSettings/ProfileSettings.vue
+++ b/src/views/ProfileSettings/ProfileSettings.vue
@@ -131,7 +131,6 @@
import i18n from '@/i18n';
import BVToastMixin from '@/components/Mixins/BVToastMixin';
import InputPasswordToggle from '@/components/Global/InputPasswordToggle';
-import { format } from 'date-fns-tz';
import {
maxLength,
minLength,
@@ -139,6 +138,7 @@ import {
sameAs
} from 'vuelidate/lib/validators';
import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
+import LocalTimezoneLabelMixin from '@/components/Mixins/LocalTimezoneLabelMixin';
import PageTitle from '@/components/Global/PageTitle';
import PageSection from '@/components/Global/PageSection';
import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js';
@@ -146,7 +146,12 @@ import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js';
export default {
name: 'ProfileSettings',
components: { InputPasswordToggle, PageSection, PageTitle },
- mixins: [BVToastMixin, LoadingBarMixin, VuelidateMixin],
+ mixins: [
+ BVToastMixin,
+ LocalTimezoneLabelMixin,
+ LoadingBarMixin,
+ VuelidateMixin
+ ],
data() {
return {
form: {
@@ -164,10 +169,7 @@ export default {
return this.$store.getters['localUsers/accountPasswordRequirements'];
},
timezone() {
- const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
- const shortTz = this.$options.filters.shortTimeZone(new Date());
- const pattern = `'${shortTz}' O`;
- return format(new Date(), pattern, { timezone }).replace('GMT', 'UTC');
+ return this.localOffset();
}
},
created() {