Skip to content

Conversation

@joe-clickhouse
Copy link
Contributor

@joe-clickhouse joe-clickhouse commented Nov 4, 2025

Summary

During DST fallback, the same time can occur twice. Without additional kwargs, pd.DatetimeIndex can't interpret ambiguous times. This is fixed by converting to UTC (which is never ambiguous) before removing the timezone, then re-localizing to UTC and converting back to the target timezone.

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG

Closes #585

@joe-clickhouse joe-clickhouse linked an issue Nov 4, 2025 that may be closed by this pull request
@mshustov mshustov requested a review from genzgd November 4, 2025 09:57
@joe-clickhouse joe-clickhouse merged commit 84e3a18 into main Nov 4, 2025
78 checks passed
@joe-clickhouse joe-clickhouse deleted the joe/585-pandas-ambiguoustimeerror-in-version-092 branch November 4, 2025 17:08
meirdev pushed a commit to meirdev/clickhouse-connect that referenced this pull request Nov 5, 2025
joe-clickhouse added a commit that referenced this pull request Nov 5, 2025
* add executor parameter to AsyncClient

* add note to change log

* fix: we only want to shutdown the executor if we created it

* add a custom object to represent the sentinel

* fix typing

* add warning log when executor_threads and executor are used

* fix ambiguous time bug (#587)

* fix version import (#583)

* fix version import

* add missing type

* add missing types

* fix #586: inconsistent type hint

* fix tls test path in contribution docs

* revert playtest

---------

Signed-off-by: Meir <[email protected]>
Co-authored-by: Joe S <[email protected]>
Co-authored-by: Marek Wiese <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pandas AmbiguousTimeError in version 0.9.2

3 participants