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

fix(rust, python): raise if tz_localize called on UTC-aware #6526

Merged
merged 3 commits into from
Jan 29, 2023

Conversation

MarcoGorelli
Copy link
Collaborator

closes #6525

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jan 28, 2023
@MarcoGorelli MarcoGorelli marked this pull request as ready for review January 28, 2023 12:24
Comment on lines -149 to -151
Some(tz) if tz == "UTC" => {
Ok(ca.with_time_zone(Some("UTC".into()))?.into_series())
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was added in https://github.com/pola-rs/polars/pull/5522/files , but it looks like it's no longer necessary

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm maybe the intention was to match the target tz? I'll update later, marking as draft for now

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've rewritten according to what I think the intention was

@MarcoGorelli MarcoGorelli marked this pull request as draft January 28, 2023 13:06
@MarcoGorelli MarcoGorelli marked this pull request as ready for review January 28, 2023 20:55
@ritchie46
Copy link
Member

Yeap.. 👍

@ritchie46 ritchie46 merged commit 055c86d into pola-rs:master Jan 29, 2023
cojmeister pushed a commit to cojmeister/polars that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tz_localize is allowed (but ignored?) when current timezone is UTC?
2 participants