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

View file

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