-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-35448: [C++] Fix detection of %z in strptime format #35449
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
Conversation
|
|
kou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
| StrptimeOptions options("%m/%d/%Y %z", TimeUnit::MICRO, /*error_is_null=*/true); | ||
| this->CheckUnary("strptime", input1, timestamp(TimeUnit::MICRO, "UTC"), output1, | ||
| &options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you append 1 to options (options1) for consistency?
pitrou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, thanks @jorisvandenbossche
|
Benchmark runs are scheduled for baseline = 7fd6461 and contender = 0980dbe. 0980dbe is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
|
['Python', 'R'] benchmarks have high level of regressions. |
Rationale for this change
See gh-35448 for the failing example. The current code in
GetZonewas assuming there was always some character between the%zand the preceding%code (like a whitespace, or-or/). That is often not the case with%z(in time formats like00:00+01, the+is part of%z, and so the format is%H:%M%zwithout character between%Mand%z)Are these changes tested?
Test is added
Are there any user-facing changes?
The result type will no now correctly have a
tz=UTCparametrization