Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix: Ensure timestamp returned from sessions estimate is in UTC (#60502)

Tomás Farías Santana132efc402b25
diff --git a/products/batch_exports/backend/temporal/record_batch_model.py b/products/batch_exports/backend/temporal/record_batch_model.py
index 159684d8fd59..fe1bbf0e95d2 100644
--- a/products/batch_exports/backend/temporal/record_batch_model.py
+++ b/products/batch_exports/backend/temporal/record_batch_model.py
@@ -234,7 +234,7 @@ INSERT INTO FUNCTION {s3_function}
return ast.SelectQuery(
select=[
- parse_expr("min($end_timestamp) as min_timestamp"),
+ parse_expr("toTimeZone(min($end_timestamp), 'UTC') as min_timestamp"),
parse_expr("count() as record_count"),
],
select_from=ast.JoinExpr(table=ast.Field(chain=["sessions"])),