fix: list local date
This commit is contained in:
@@ -121,7 +121,9 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
</Col>
|
||||
<Col span={5}>
|
||||
<span style={{ paddingLeft: 38 }}>
|
||||
{dayjs.utc(item.created_at).format('YYYY-MM-DD HH:mm:ss')}
|
||||
{dayjs(item.created_at)
|
||||
.local()
|
||||
.format('YYYY-MM-DD HH:mm:ss')}
|
||||
</span>
|
||||
</Col>
|
||||
<Col span={4}>
|
||||
|
||||
@@ -360,18 +360,26 @@ const Models: React.FC<ModelsProps> = ({
|
||||
key="replicas"
|
||||
align="center"
|
||||
span={4}
|
||||
render={(text, record: ListItem) => {
|
||||
return (
|
||||
<span>
|
||||
{record.ready_replicas} / {record.replicas}
|
||||
</span>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<SealColumn
|
||||
span={5}
|
||||
title={intl.formatMessage({ id: 'common.table.createTime' })}
|
||||
dataIndex="created_at"
|
||||
key="createTime"
|
||||
key="created_at"
|
||||
defaultSortOrder="descend"
|
||||
sortOrder={sortOrder}
|
||||
showSorterTooltip={false}
|
||||
sorter={true}
|
||||
render={(val, row) => {
|
||||
return dayjs.utc(val).format('YYYY-MM-DD HH:mm:ss');
|
||||
render={(text, row) => {
|
||||
console.log('val=time===', text, row.name, row, row.created_at);
|
||||
return dayjs(text).local().format('YYYY-MM-DD HH:mm:ss');
|
||||
}}
|
||||
/>
|
||||
<SealColumn
|
||||
|
||||
Reference in New Issue
Block a user