-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
ARROW-14477: [C++] Timezone-aware kernels should also handle offset strings #12865
base: main
Are you sure you want to change the base?
Conversation
@pitrou @lidavidm @jorisvandenbossche this is complete yet but I would like to validate the approach with you before I continue. Do you feel this makes enough sense to complete the PR? |
What is this comment in reference to? It seems this PR would handle 30 minute iterations correctly? |
cpp/src/arrow/vendored/datetime/tz.h
Outdated
@@ -294,6 +294,40 @@ struct zoned_traits | |||
{ | |||
}; | |||
|
|||
class OffsetZone { |
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.
As a policy, we shouldn't add our own code inside vendored libraries. Just put it somewhere else in the source tree (for example in a arrow/util/date_internal.h
where the vendored code would be included)
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.
Will do.
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.
Moved. The code in the file is adapted from here, but I've added our license header. Is that ok?
Current implementation can handle fixed offsets of iterations of one hour. This PR would enable offsets of arbitrary number of minutes. So primary use of that would indeed be to operate in |
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Currently timestamp arrays have unit
timestamp(unit, zone name)
. This would add "offset timezones" where timestamp array would also support units liketimestamp(unit, "GMT+/-HH:MM")
.