Skip to content

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

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

Closed

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

Copy link
Contributor

github-actions bot commented Jan 2, 2025

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Jan 2, 2025
@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Timezone upon DatetimeIndex union is changed to UTC
2 participants