Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Preserve Timezone and Higher Resolution in DatetimeIndex.union #60473

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

brandonmonge
Copy link

  • closes BUG: Timezone upon DatetimeIndex union is changed to UTC #60080 (Ensure timezone and resolution are preserved in DatetimeIndex.union operations with the same timezone but different units)
  • Tests added and passed if fixing a bug or adding a new feature:
    • Added test_union_preserves_timezone_and_resolution.
    • Added test_union_different_timezones.
  • All code checks passed:
    • Used pre-commit hooks for flake8, isort, and black.
  • Added type annotations to new arguments/methods/functions:
    • Annotated the resolution comparison logic and ensured clarity for mappings.
  • Added an entry in the latest doc/source/whatsnew/v3.0.0.rst file if fixing a bug or adding a new feature:
    • Section: Bug Fixes
      • Entry: Fixed timezone and resolution preservation in DatetimeIndex.union. Previously, DatetimeIndex.union would sometimes convert timezone-aware indices with the same timezone but different units to UTC. GH#60080

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.

BUG: Timezone upon DatetimeIndex union is changed to UTC
1 participant