Skip to content

Commit d04fff6

Browse files
committed
fix monthly truncation timezone issue
1 parent 220c2af commit d04fff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/clickhouse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function getDateStringSQL(data: any, unit: string = 'utc', timezone?: string) {
6161

6262
function getDateSQL(field: string, unit: string, timezone?: string) {
6363
if (timezone) {
64-
return `toDateTime(date_trunc('${unit}', ${field}, '${timezone}'))`;
64+
return `toDateTime(date_trunc('${unit}', ${field}, '${timezone}'), '${timezone}')`;
6565
}
6666
return `toDateTime(date_trunc('${unit}', ${field}))`;
6767
}

0 commit comments

Comments
 (0)