Revisit timestamp UTC conversion during log download

This commit is contained in:
Serkan Reis 2023-05-03 21:50:15 +03:00
parent 0f8c9dfe7a
commit ec253bd8f7

View File

@ -123,9 +123,9 @@ export const LogModal = (props: LogModalProps) => {
onClick={() => { onClick={() => {
const csv = logs.itemList const csv = logs.itemList
.map((logItem) => { .map((logItem) => {
return `${logItem.type as string},${logItem.message},${(logItem.timestamp as Date) return `${logItem.type as string},${logItem.message},${
.toUTCString() logItem.timestamp ? new Date(logItem.timestamp).toUTCString().replace(',', '') : ''
.replace(',', '')}` }`
}) })
.join('\n') .join('\n')
const blob = new Blob([csv], { type: 'text/csv' }) const blob = new Blob([csv], { type: 'text/csv' })