GitHub user icexelloss opened a pull request:
https://github.com/apache/spark/pull/20537
[SPARK-23314][PYTHON] Add ambiguous=False when localizing tz-naive
timestamps to deal with dst
## What changes were proposed in this pull request?
When tz_localize a tz-naive timetamp, pandas will throw exception if the
timestamp is during daylight saving time period, e.g., 2015-11-01 01:30:00.
This PR fixes this issue by setting `ambiguous=False` when calling tz_localize,
which is the same default behavior of pytz.
## How was this patch tested?
Add `test_timestamp_dst`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/icexelloss/spark SPARK-23314
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/20537.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #20537
----
commit 6435feffdc056a8744848e367a585d32e8734b5f
Author: Li Jin <ice.xelloss@...>
Date: 2018-02-07T22:38:19Z
Add ambiguous=False when localizing tz-naive timestamps to deal with dst
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]