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(rust, python): add dt.dst_offset feature #9629

Merged
merged 6 commits into from
Jun 30, 2023

Conversation

MarcoGorelli
Copy link
Collaborator

closes https://stackoverflow.com/questions/76578147/dst-temporal-feature-from-timestamp-using-polars ;) (should probably be added as an answer if/when accepted + released)

Related, but I think it'd be good to add .dt.base_utc_offset as well

@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 labels Jun 29, 2023
@MarcoGorelli MarcoGorelli marked this pull request as ready for review June 30, 2023 06:59
};

#[cfg(feature = "timezones")]
pub trait PolarsDSTOffset {
Copy link
Member

Choose a reason for hiding this comment

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

Given that we only dispatch via the expression API. Shall simply make a function that accepts a &DatetimeChunked.

@MarcoGorelli MarcoGorelli marked this pull request as draft June 30, 2023 10:03
@MarcoGorelli MarcoGorelli marked this pull request as ready for review June 30, 2023 10:37
@ritchie46
Copy link
Member

Thanks @MarcoGorelli. Looks great!

I shall leave the credit of the SO question for you. ;)

@ritchie46 ritchie46 merged commit 465e93d into pola-rs:main Jun 30, 2023
@ritchie46
Copy link
Member

Whoops! I already merged. We forgot the docs entry in the reference guide. 🙈

@MarcoGorelli
Copy link
Collaborator Author

ah my bad (I may need to try writing a script for this, it's not the first time I forget) - anyway, added in #9636 for now

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
Development

Successfully merging this pull request may close these issues.

2 participants