mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-30 04:31:59 +08:00
fix: convert timestamp in new trace explorer to user browser timezone and readable format (#5235)
* fix: convert timestamp in new trace explorer to user browser timezone and readable format * fix: code refactor
This commit is contained in:
parent
a65d5095a0
commit
1695b4f06d
@ -3,6 +3,7 @@ import { ColumnsType } from 'antd/es/table';
|
||||
import ROUTES from 'constants/routes';
|
||||
import { getMs } from 'container/Trace/Filters/Panel/PanelBody/Duration/util';
|
||||
import { formUrlParams } from 'container/TraceDetail/utils';
|
||||
import dayjs from 'dayjs';
|
||||
import { RowData } from 'lib/query/createTableColumnsFromQuery';
|
||||
import { ILog } from 'types/api/logs/log';
|
||||
import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';
|
||||
@ -30,6 +31,13 @@ export const getListColumns = (
|
||||
key: 'date',
|
||||
title: 'Timestamp',
|
||||
width: 145,
|
||||
render: (item): JSX.Element => {
|
||||
const date =
|
||||
typeof item === 'string'
|
||||
? dayjs(item).format('YYYY-MM-DD HH:mm:ss.SSS')
|
||||
: dayjs(item / 1e6).format('YYYY-MM-DD HH:mm:ss.SSS');
|
||||
return <Typography.Text>{date}</Typography.Text>;
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user