diff --git a/src/lib/clickhouse.ts b/src/lib/clickhouse.ts index 0a336f80..f2ebbb72 100644 --- a/src/lib/clickhouse.ts +++ b/src/lib/clickhouse.ts @@ -61,7 +61,7 @@ function getDateStringSQL(data: any, unit: string = 'utc', timezone?: string) { function getDateSQL(field: string, unit: string, timezone?: string) { if (timezone) { - return `toDateTime(date_trunc('${unit}', ${field}, '${timezone}'), '${timezone}')`; + return `toDateTime(date_trunc('${unit}', ${field}, '${timezone}'))`; } return `toDateTime(date_trunc('${unit}', ${field}))`; }