sintonia_webapp/resources/js/components/header/Timer.vue
marcoc 75d56a1b7b feat(fe): added header
ToDo: connect clock to shows, style corrections
2025-03-04 17:10:30 +01:00

25 lines
No EOL
494 B
Vue

<script setup lang="ts">
import {useAuthStore} from "@/stores/auth.store.ts";
import {computed, ref} from "vue";
const auth = useAuthStore();
const timezone = auth.userData.timezone;
const time = ref(new Date().toLocaleString("it-IT", {timeZone: timezone}));
setInterval(() => {
time.value = new Date().toLocaleString("it-IT", {timeZone: timezone});
}, 1000)
</script>
<template>
<div class="timer">
<span>
{{ time }}
</span>
</div>
</template>
<style scoped>
</style>