From 0eb0346abcb28b1cc224e4d8bc4872773714b70d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Tue, 14 Nov 2023 10:18:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=9E=E4=BD=93=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=9A=84=E6=97=B6=E9=97=B4=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=92=8C=E5=85=B6=E4=BB=96=E6=97=B6=E9=97=B4=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=B8=BAYYYY-MM-DD=20hh:mm:ss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/tools.js b/src/utils/tools.js index 64379455..c561a2b4 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -1443,7 +1443,7 @@ export const changeTimeByDate = (date) => { const hours = Math.floor(diff / 3600) return hours === 1 ? `${hours} ${i18n.global.t('entity.search.hourAgo')}` : `${hours} ${i18n.global.t('entity.search.hoursAgo')}` } else { - return (new Date(oldDate).toString()).replace(/GMT.*/, '') + return date } } }