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

feat: Extract timezone info from python datetimes #20822

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

Conversation

bschoenmaeckers
Copy link
Contributor

@bschoenmaeckers bschoenmaeckers commented Jan 21, 2025

We now extract the timezone from python as of #20660 (comment). It is however not yet clear to me when we have to infer the local timezone because all tests currently pass.

fixes #20766
closes #19509

@bschoenmaeckers bschoenmaeckers changed the title feat: extract timezone info from python datetimes feat: Extract timezone info from python datetimes Jan 21, 2025
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Jan 21, 2025
@bschoenmaeckers bschoenmaeckers force-pushed the python-datetime-timezone branch from f33c0a8 to 837df0c Compare January 21, 2025 12:34
@bschoenmaeckers
Copy link
Contributor Author

... all tests currently pass.

Apparently not on python 3.9

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.64%. Comparing base (24fccc4) to head (161bc95).

Files with missing lines Patch % Lines
py-polars/polars/_utils/construction/utils.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #20822   +/-   ##
=======================================
  Coverage   79.64%   79.64%           
=======================================
  Files        1571     1571           
  Lines      223156   223161    +5     
  Branches     2546     2543    -3     
=======================================
+ Hits       177731   177742   +11     
+ Misses      44841    44838    -3     
+ Partials      584      581    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bschoenmaeckers
Copy link
Contributor Author

The amount of timezone related issues showed me where the "infer" part needs to be. I will investigate which issues are relevant to this and add tests accordingly.

@bschoenmaeckers bschoenmaeckers force-pushed the python-datetime-timezone branch 4 times, most recently from a242bd7 to e8842e9 Compare January 22, 2025 17:20
@bschoenmaeckers
Copy link
Contributor Author

Probably fixes #20544 and #19268 as well. Will add tests later.

I can pickup #20264 as well when I'm still on it.

@bschoenmaeckers bschoenmaeckers force-pushed the python-datetime-timezone branch from e8842e9 to 161bc95 Compare January 23, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
1 participant