Skip to content

GH-31315: [C++][Docs] Document strptime %Z behavior - #55600

Open
Dricmoy wants to merge 1 commit into
apache:mainfrom
Dricmoy:gh-31315-strptime-percent-z
Open

Dricmoy wants to merge 1 commit into
apache:mainfrom
Dricmoy:gh-31315-strptime-percent-z

Conversation

@Dricmoy

@Dricmoy Dricmoy commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

strptime never uses %Z to set the result's time zone or adjust the parsed time, and what %Z accepts depends on the platform's strptime:

  • Linux (glibc): any word is consumed and ignored, so "2022-03-05 09:00:00 blabla" parses.
  • macOS: only GMT or the local time zone abbreviation is accepted.
  • Windows (vendored musl strptime): %Z isn't supported, so parsing fails.

This picks up #40186, which stalled on wording. "Ignores any string" is only true on Linux, so the note describes the platform dependence instead.

What changes are included in this PR?

A note on %Z in the strptime function doc (which the Python docstring is generated from) and in the C++ compute docs table.

Are these changes tested?

Docs only. I checked the behavior with pyarrow 26.0.1 on macOS, in glibc's time/strptime_l.c, and in cpp/src/arrow/vendored/musl/strptime.c. clang-format passes and scalar_temporal_unary.cc compiles.

Are there any user-facing changes?

Documentation only.

Was AI used for this PR?

In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.

Yes. Claude checked the behavior on each platform and wrote the change and this description. I reviewed it and take responsibility for the contribution.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Dricmoy
Dricmoy requested a review from pitrou as a code owner November 13, 2026 17:42
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #31315 has been automatically assigned in GitHub to PR creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant