From 3cb4592eb3746ebab9e69fe1e5d6157817a33ccb Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Sun, 8 Oct 2023 10:53:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/java110/utils/DateUtil.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/java110/utils/DateUtil.js b/lib/java110/utils/DateUtil.js index 8352dfb..55f6f48 100644 --- a/lib/java110/utils/DateUtil.js +++ b/lib/java110/utils/DateUtil.js @@ -70,7 +70,8 @@ export function getDate(strDate) { var a = st.split(" "); //这个根据你的字符串决定,如果中间为T则改T var b = a[0].split("-"); var c = a[1].split(":"); - var date = new Date(b[0], b[1], b[2], c[0], c[1], c[2]); + let month = parseInt(b[1])-1; + var date = new Date(b[0], month, b[2], c[0], c[1], c[2]); return date; };