From 6675a01b9d2a42413a8a0b9d77a0a90233376ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Mon, 29 Nov 2021 14:35:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=97=B6=E5=8C=BA=E4=B8=8D=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/common.js b/src/utils/common.js index 14dd8495d..8630a788f 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -1,4 +1,5 @@ const _ = require('lodash') +const moment = require('moment') function getTimeUnits(u) { const units = { @@ -169,7 +170,8 @@ export function getDayEnd(now) { if (!now) { now = new Date() } - return new Date(new Date(now.toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1) + const zoneTime = moment(now).utc().endOf('month').format('YYYY-MM-DD HH:mm:ss') + return moment(zoneTime).utc().toDate() } export function setUrlParam(url, name, value) {