do not remove ms for clickhouse timestamps
This commit is contained in:
@@ -52,11 +52,7 @@ export async function chQuery<T extends Record<string, any>>(
|
|||||||
|
|
||||||
export function formatClickhouseDate(_date: Date | string) {
|
export function formatClickhouseDate(_date: Date | string) {
|
||||||
const date = typeof _date === 'string' ? new Date(_date) : _date;
|
const date = typeof _date === 'string' ? new Date(_date) : _date;
|
||||||
return date
|
return date.toISOString().replace('T', ' ').replace(/Z+$/, '');
|
||||||
.toISOString()
|
|
||||||
.replace('T', ' ')
|
|
||||||
.replace(/Z+$/, '')
|
|
||||||
.replace(/\.[0-9]+$/, '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function convertClickhouseDateToJs(date: string) {
|
export function convertClickhouseDateToJs(date: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user