Github user BryanCutler commented on a diff in the pull request: https://github.com/apache/spark/pull/18664#discussion_r131723483 --- Diff: python/pyspark/sql/tests.py --- @@ -3036,6 +3052,9 @@ def test_toPandas_arrow_toggle(self): pdf = df.toPandas() self.spark.conf.set("spark.sql.execution.arrow.enable", "true") pdf_arrow = df.toPandas() + # need to remove timezone for comparison + pdf_arrow["7_timestamp_t"] = \ + pdf_arrow["7_timestamp_t"].apply(lambda ts: ts.tz_localize(None)) --- End diff -- Without Arrow, Spark will provide timestamps that are tz-naive. We would need to construct the Pandas DataFrame, then call `tz_localize` with the `SESSION_LOCAL_TIMEZONE` which would then change the internal values to be normalized to UTC, as @wesm pointed out above. I don't think this is a very good idea, because it assumes the timestamp was created with the `SESSION_LOCAL_TIMEZONE`
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org