apache / apache/arrow

[C++] string created by strftime can't be parsed by strptime

Open
#40,170 3 comments 0 reactions 0 assignees View on GitHub
Component: C++ Component: Python Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

>>> pa.compute.strftime(pd.Timestamp.utcnow(), "%Y-%m-%d %z")

>>> pa.compute.strptime('2024-02-21 +0000', "%Y-%m-%d %z", "ns")
Traceback (most recent call last):
File "", line 1, in
File "D:\pd_dev_1208\Lib\site-packages\pyarrow\compute.py", line 263, in wrapper
return func.call(args, options, memory_pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pyarrow\_compute.pyx", line 385, in pyarrow._compute.Function.call
File "pyarrow\error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow\error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Failed to parse string: '2024-02-21 +0000' as a scalar of type timestamp[ns]
>>>

### Component(s)

C++, Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.