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(batch-exports): Convert ms + Etc/UTC to us + UTC (#66333)

Tomás Farías Santana3b8a0675da03
diff --git a/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py b/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py
index 5cc369bdf343..6908c3e270d2 100644
--- a/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py
+++ b/products/batch_exports/backend/temporal/destinations/bigquery_batch_export.py
@@ -1279,6 +1279,9 @@ async def run_consumers(
(pa.timestamp("ms", tz="UTC"), pa.timestamp("us", tz="UTC")): functools.partial(
_cast_to_lossless_timestamp, unit="us"
),
+ (pa.timestamp("ms", tz="Etc/UTC"), pa.timestamp("us", tz="UTC")): functools.partial(
+ _cast_to_lossless_timestamp, unit="us"
+ ),
},
),
serialized,
@@ -1603,6 +1606,10 @@ async def insert_into_bigquery_activity_from_stage(inputs: BigQueryInsertInputs)
(pa.timestamp("ms", tz="UTC"), pa.timestamp("us", tz="UTC")): functools.partial(
_cast_to_lossless_timestamp, unit="us"
),
+ (
+ pa.timestamp("ms", tz="Etc/UTC"),
+ pa.timestamp("us", tz="UTC"),
+ ): functools.partial(_cast_to_lossless_timestamp, unit="us"),
},
),
serialized,