moment.js/day.js UTC time to local time
import moment from 'moment';
const time = xxx;
moment.utc(time).local().format("YYYY-MM-DD HH:mm:ss")
In Nuxt.js, you need to change moment.js
to day.js
.
const dayjs = useDayjs();
const time = xxx;
dayjs.utc(time).local().format("YYYY-MM-DD HH:mm:ss")
There is no comment, let's add the first one.