do not remove ms for clickhouse timestamps

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-05-05 15:04:12 +02:00
parent 215dac80ae
commit c0c80e7979

View File

@@ -52,11 +52,7 @@ export async function chQuery<T extends Record<string, any>>(
export function formatClickhouseDate(_date: Date | string) {
const date = typeof _date === 'string' ? new Date(_date) : _date;
return date
.toISOString()
.replace('T', ' ')
.replace(/Z+$/, '')
.replace(/\.[0-9]+$/, '');
return date.toISOString().replace('T', ' ').replace(/Z+$/, '');
}
export function convertClickhouseDateToJs(date: string) {