revert getDateStringSQL for CH
This commit is contained in:
1 parent
5ded9abbfe
commit
a3f32b036d
1 file changed
+3
-3
@@ -51,12 +51,12 @@ function getUTCString(date?: Date | string | number) {
|
||||
return formatInTimeZone(date || new Date(), 'UTC', 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
|
||||
function getDateStringSQL(field: string, unit: string, timezone?: string) {
|
||||
function getDateStringSQL(data: any, unit: string = 'utc', timezone?: string) {
|
||||
if (timezone) {
|
||||
return `formatDateTime(${field}, '${CLICKHOUSE_DATE_FORMATS[unit]}', '${timezone}')`;
|
||||
return `formatDateTime(${data}, '${CLICKHOUSE_DATE_FORMATS[unit]}', '${timezone}')`;
|
||||
}
|
||||
|
||||
return `formatDateTime(${field}, '${CLICKHOUSE_DATE_FORMATS[unit]}')`;
|
||||
return `formatDateTime(${data}, '${CLICKHOUSE_DATE_FORMATS[unit]}')`;
|
||||
}
|
||||
|
||||
function getDateSQL(field: string, unit: string, timezone?: string) {
|
||||
|
||||
Reference in new issue
Block a user