25 lines
No EOL
494 B
Vue
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> |