Skip to content

Commit

Permalink
convert timestamp to utc before adding interval
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr committed Mar 27, 2024
1 parent 294b351 commit 7c8323b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog/hogql_queries/insights/paths_query_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def handle_funnel(self) -> tuple[list, Optional[ast.Expr]]:
unit = funnelSourceFilter.funnelWindowIntervalUnit
interval_unit = funnel_window_interval_unit_to_sql(unit)
operator = ">=" if funnelPathType == FunnelPathType.funnel_path_after_step else "<="
default_case = f"events.timestamp {operator} {{target_timestamp}}"
default_case = f"events.timestamp {operator} toTimeZone({{target_timestamp}}, 'UTC')"
if funnelPathType == FunnelPathType.funnel_path_after_step and funnelStep and funnelStep < 0:
default_case += f" + INTERVAL {interval} {interval_unit}"
event_filter = parse_expr(
Expand Down

0 comments on commit 7c8323b

Please sign in to comment.