In the console log, I have 15:14
, but in the template, I got 12:14
. Why?
<template>
<span>{{ date }}</span> <!-- **expected** Thu, 25 Feb 2021 15:14:04 Thu, **got** 25 Feb 2021 12:14:04 GMT -->
</template>
<script>
export default {
computed: {
date() {
const date = getStatusDate(); // returns string 2021-02-25 15:14:04
return dayjs(date, 'YYYY-MM-DD HH:mm:ss+z')
}
}
}
</script>