From c7de19d3b5f97525dc16b31ae48030722df135e4 Mon Sep 17 00:00:00 2001 From: whyour Date: Fri, 5 Nov 2021 23:56:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DtoLocaleString=200=E7=82=B9?= =?UTF-8?q?=E6=98=BE=E7=A4=BA24=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/crontab/index.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx index 2e23072a..4ff5ceb1 100644 --- a/src/pages/crontab/index.tsx +++ b/src/pages/crontab/index.tsx @@ -146,12 +146,11 @@ const Crontab = ({ headerStyle, isPhone }: any) => { }} > {record.last_execution_time - ? new Date(record.last_execution_time * 1000).toLocaleString( - language, - { + ? new Date(record.last_execution_time * 1000) + .toLocaleString(language, { hour12: false, - }, - ) + }) + .replace(' 24:', ' 00:') : '-'} ); @@ -198,9 +197,11 @@ const Crontab = ({ headerStyle, isPhone }: any) => { display: 'block', }} > - {record.nextRunTime.toLocaleString(language, { - hour12: false, - })} + {record.nextRunTime + .toLocaleString(language, { + hour12: false, + }) + .replace(' 24:', ' 00:')} ); },