修复toLocaleString 0点显示24点

This commit is contained in:
whyour 2021-11-05 23:56:16 +08:00
parent 65ade4b996
commit c7de19d3b5

View File

@ -146,12 +146,11 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
}} }}
> >
{record.last_execution_time {record.last_execution_time
? new Date(record.last_execution_time * 1000).toLocaleString( ? new Date(record.last_execution_time * 1000)
language, .toLocaleString(language, {
{
hour12: false, hour12: false,
}, })
) .replace(' 24:', ' 00:')
: '-'} : '-'}
</span> </span>
); );
@ -198,9 +197,11 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
display: 'block', display: 'block',
}} }}
> >
{record.nextRunTime.toLocaleString(language, { {record.nextRunTime
hour12: false, .toLocaleString(language, {
})} hour12: false,
})
.replace(' 24:', ' 00:')}
</span> </span>
); );
}, },