gaogaotiantian commented on code in PR #52980:
URL: https://github.com/apache/spark/pull/52980#discussion_r2512876053
##########
python/pyspark/sql/types.py:
##########
@@ -400,7 +406,9 @@ def toInternal(self, dt: datetime.datetime) -> int:
def fromInternal(self, ts: int) -> datetime.datetime:
if ts is not None:
# using int to avoid precision loss in float
- return datetime.datetime.fromtimestamp(ts //
1000000).replace(microsecond=ts % 1000000)
+ return datetime.datetime.fromtimestamp(ts // 1000000,
self.tz_info).replace(
Review Comment:
This is WIP for now. I just realized that there are some timezone
manipulations in our tests.
BTW, the timezone config does not work in workers - there's a ticket for it
(https://issues.apache.org/jira/browse/SPARK-33863). We can use this mechanism
and limit it in either worker process or the conversion itself.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]