Only show datetime tz toggle if offset is different

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-11-10 20:39:44 +01:00
parent 38a3ffc19f
commit 9583804890
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,7 @@
</p>
</template>
<script lang="ts">
import { getTimezoneOffset } from "date-fns-tz";
import { Component, Prop, Vue } from "vue-property-decorator";
@Component
@ -177,6 +178,8 @@ export default class EventFullDate extends Vue {
return (
!!this.timezone &&
!!this.userActualTimezone &&
getTimezoneOffset(this.timezone) !==
getTimezoneOffset(this.userActualTimezone) &&
this.timezone !== this.userActualTimezone
);
}