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

'%+' isn't auto-detected to be tz-aware #6433

Closed
2 tasks done
MarcoGorelli opened this issue Jan 25, 2023 · 0 comments · Fixed by #6434
Closed
2 tasks done

'%+' isn't auto-detected to be tz-aware #6433

MarcoGorelli opened this issue Jan 25, 2023 · 0 comments · Fixed by #6434
Labels
bug Something isn't working rust Related to Rust Polars

Comments

@MarcoGorelli
Copy link
Collaborator

MarcoGorelli commented Jan 25, 2023

Polars version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of Polars.

Issue description

'%+' requires a timezone to be present, but polars doesn't auto-detect it to be tz-aware

Reproducible example

In [1]: pl.Series(["2020-01-01T00:00:00Z"]).str.strptime(pl.Datetime, '%+')
Out[1]:
shape: (1,)
Series: '' [datetime[μs]]
[
        2020-01-01 00:00:00
]

Expected behavior

shape: (1,)
Series: '' [datetime[μs, +00:00]]
[
        2020-01-01 00:00:00 +00:00
]

Installed versions

---Version info--- Polars: 0.15.16 Index type: UInt32 Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 Python: 3.11.1 (main, Dec 7 2022, 01:11:34) [GCC 11.3.0] ---Optional dependencies--- pyarrow: 10.0.1 pandas: 1.5.3 numpy: 1.24.1 fsspec: connectorx: xlsx2csv: deltalake: matplotlib:
@MarcoGorelli MarcoGorelli added bug Something isn't working rust Related to Rust Polars labels Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rust Related to Rust Polars
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant