Skip to content

Commit cec3438

Browse files
authored
Fix hourly events query. (#66)
1 parent 82f4517 commit cec3438

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/api/src/query/builders/summary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const SummaryBuilders: Record<string, SimpleQueryConfig> = {
141141
),
142142
hour_range AS (
143143
SELECT arrayJoin(arrayMap(
144-
h -> toDateTime(concat({startDate:String}, ' 00:00:00')) + (h * 3600),
144+
h -> toStartOfHour(toTimeZone(toDateTime(concat({startDate:String}, ' 00:00:00')) + (h * 3600), {timezone:String})),
145145
range(toUInt32(dateDiff('hour', toDateTime(concat({startDate:String}, ' 00:00:00')), toDateTime(concat({endDate:String}, ' 23:59:59'))) + 1))
146146
)) AS datetime
147147
),

0 commit comments

Comments
 (0)