1import { format } from 'date-fns-tz';
2
3const LocalTimezoneLabelMixin = {
4  methods: {
5    localOffset() {
6      const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
7      const shortTz = this.$options.filters.shortTimeZone(new Date());
8      const pattern = `'${shortTz}' O`;
9      return format(new Date(), pattern, { timezone }).replace('GMT', 'UTC');
10    },
11  },
12};
13
14export default LocalTimezoneLabelMixin;
15