Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
fix: fix time zone inconsistence
Browse files Browse the repository at this point in the history
  • Loading branch information
Crazyokd committed May 1, 2023
1 parent 1e64b2f commit 04024a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/MessageArea/MessageArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default {
},
filters: {
timeFormater(time) {
return date.convertTime(time);
return date.wrapSendTime(time);
},
},
mounted() {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/date.js
Original file line number Diff line number Diff line change
@@ -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");
Expand Down

0 comments on commit 04024a4

Please sign in to comment.