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

Correctly handle zoneinfo timezones #2253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

IvoDD
Copy link
Collaborator

@IvoDD IvoDD commented Mar 19, 2025

Reference Issues/PRs

Fixes #2245

What does this implement or fix?

Correctly normalizes zoneinfo timezones. Currently if we write something as a pytz or a ZoneInfo timezone we'll read it back as a pytz to preserve old pytz behavior and not break old arctic readers.

Consensus is that people generally prefer ZoneInfo and we can change to always using ZoneInfo but we'll need to do so in next major release.

Any other comments?

Checklist

Checklist for code changes...
  • Have you updated the relevant docstrings, documentation and copyright notice?
  • Is this contribution tested against all ArcticDB's features?
  • Do all exceptions introduced raise appropriate error messages?
  • Are API changes highlighted in the PR description?
  • Is the PR labelled as enhancement or bug so it appears in autogenerated release notes?

@IvoDD IvoDD added the patch Small change, should increase patch version label Mar 19, 2025
@IvoDD IvoDD force-pushed the fix-zone-info-handling branch 7 times, most recently from 9e52ff1 to de8e814 Compare March 20, 2025 13:05
Fixes #2245

Correctly normalizes zoneinfo timezones. Currently if we write something
as a pytz or a ZoneInfo timezone we'll read it back as a `pytz` to
preserve old pytz behavior and not break old arctic readers.

Consensus is that people generally prefer `ZoneInfo` and we can change
to always using `ZoneInfo` but we'll need to do so in next major
release.
@IvoDD IvoDD force-pushed the fix-zone-info-handling branch from de8e814 to da29461 Compare March 20, 2025 16:20
@IvoDD IvoDD marked this pull request as ready for review March 20, 2025 16:20
Copy link
Collaborator

@G-D-Petrov G-D-Petrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some compat tests as well?

sym = "sym"
df = timestamp_indexed_df()
# We need to normalize all of these timezoned timestamps correctly and produce the correct result
metadata_to_write = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add these as pytest params?
I find it a bit more clear and it helps to parallelize the execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Small change, should increase patch version
Projects
None yet
3 participants