[
https://issues.apache.org/jira/browse/SPARK-16394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15907383#comment-15907383
]
Keith Bourgoin commented on SPARK-16394:
----------------------------------------
PS: The above is from Spark 2.1.0 running on an Ubuntu 14.04 VM. I don't think
I change change the affected versions listed at the top, but it seems that this
probably affects all versions.
> Timestamp conversion error in pyspark.sql.Row because of timezones
> ------------------------------------------------------------------
>
> Key: SPARK-16394
> URL: https://issues.apache.org/jira/browse/SPARK-16394
> Project: Spark
> Issue Type: Bug
> Components: PySpark
> Affects Versions: 1.6.1
> Reporter: Martin Tapp
> Priority: Minor
>
> We use DataFrame.map to convert each row to a dictionary using Row.asDict().
> The problem occurs when a Timestamp column is converted. It seems the
> Timestamp gets converted to a naive Python datetime. This causes processing
> errors since all naive datetimes get adjusted to the process' timezone. For
> instance, a Timestamp with a time of midnight see's it's time bounce based on
> the local timezone (+/- x hours).
> Current fix is to apply the pytz.utc timezone to each datetime instance.
> Proposed solution is to make all datetime instances aware and use the
> pytz.utc timezone.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]