[C++][Docs] Document that the strptime kernel ignores %Z
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 91
Description
After ARROW-12820, the `strptime` kernel still ignores the `%Z` specifier (for timezone names), and when using it, it basically ignores any string.
For example:
```python
# the %z specifier now works (after ARROW-12820)
>>> pc.strptime(["2022-03-05 09:00:00+01"], format="%Y-%m-%d %H:%M:%S%z", unit="us")
[
2022-03-05 08:00:00.000000
]
# in theory this should give the same result, but %Z is still ignore
>>> pc.strptime(["2022-03-05 09:00:00 CET"], format="%Y-%m-%d %H:%M:%S %Z", unit="us")
[
2022-03-05 09:00:00.000000
]
# as a result any garbage in the string is also ignored
>>> pc.strptime(["2022-03-05 09:00:00 blabla"], format="%Y-%m-%d %H:%M:%S %Z", unit="us")
[
2022-03-05 09:00:00.000000
]
```
I don't think it is easy to actually fix this (at least as long as we use the system strptime, see also https://github.com/apache/arrow/pull/11358#issue-1020404727). But at least we should document this limitation / gotcha.
**Reporter**: [Joris Van den Bossche](https://issues.apache.org/jira/browse/ARROW-15884) / @jorisvandenbossche
**Watchers**: [Rok Mihevc](https://issues.apache.org/jira/browse/ARROW-15884) / @rok
#### Related issues:
- [[C++] Strptime issues umbrella](https://github.com/apache/arrow/issues/31324) (is a child of)
- [[C++] Strptime ignores timezone information](https://github.com/apache/arrow/issues/28555) (is related to)
**Note**: *This issue was originally created as [ARROW-15884](https://issues.apache.org/jira/browse/ARROW-15884). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Assessment
This issue has not been assessed yet.