From ecae504a80880ca07751bbf857f71add753c0e99 Mon Sep 17 00:00:00 2001 From: OrangeM21 Date: Tue, 18 Aug 2020 19:25:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DSafari=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/jumpserver/trello/issues/237 --- src/utils/common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/common.js b/src/utils/common.js index 724295ffe..3dfbf56e5 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -65,12 +65,15 @@ function cleanDateStr(d) { case 1: d = d.split('+')[0].trimRight() break + case 2: + d = d.replace(/-/g, '/') } } - return null + return d } export function toSafeLocalDateStr(d) { + console.log(d) const date = safeDate(d) // let date_s = date.toLocaleString(getUserLang(), {hour12: false}); const date_s = date.toLocaleString(getUserLang(), { hourCycle: 'h23' })