From 04024a4de4bc8fad685e65c273d9dddf5b5e85f0 Mon Sep 17 00:00:00 2001 From: Rekord <1324596506@qq.com> Date: Mon, 1 May 2023 15:41:55 +0800 Subject: [PATCH] fix: fix time zone inconsistence --- src/components/MessageArea/MessageArea.vue | 2 +- src/utils/date.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MessageArea/MessageArea.vue b/src/components/MessageArea/MessageArea.vue index 10b3781..f861ecc 100644 --- a/src/components/MessageArea/MessageArea.vue +++ b/src/components/MessageArea/MessageArea.vue @@ -154,7 +154,7 @@ export default { }, filters: { timeFormater(time) { - return date.convertTime(time); + return date.wrapSendTime(time); }, }, mounted() { diff --git a/src/utils/date.js b/src/utils/date.js index 8237c04..6c05e03 100644 --- a/src/utils/date.js +++ b/src/utils/date.js @@ -1,7 +1,7 @@ import dayjs from "dayjs"; export default { getCurrentTime: () => { - return dayjs().add(8, "h").format("YYYY-MM-DD HH:mm:ss"); + return dayjs().format("YYYY-MM-DD HH:mm:ss"); }, convertTime: (time) => { return dayjs(time).add(-8, "h").format("YYYY-MM-DD HH:mm:ss");