fix monthly and all time charts

This commit is contained in:
Francis Cao 2024-08-27 12:02:23 -07:00
parent a219f5dbe3
commit b1caf6edb7
4 changed files with 11 additions and 11 deletions

View file

@ -63,9 +63,9 @@ function getDateStringSQL(data: any, unit: string = 'utc', timezone?: string) {
function getDateSQL(field: string, unit: string, timezone?: string) {
if (timezone) {
return `date_trunc('${unit}', ${field}, '${timezone}')`;
return `toDateTime(date_trunc('${unit}', ${field}, '${timezone}'), '${timezone}')`;
}
return `date_trunc('${unit}', ${field})`;
return `toDateTime(date_trunc('${unit}', ${field}))`;
}
function mapFilter(column: string, operator: string, name: string, type: string = 'String') {