You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Rok Mihevc (Jira)" <ji...@apache.org> on 2022/08/17 11:40:00 UTC
[jira] [Comment Edited] (ARROW-17398) [C++] Add support for %Z to strptime
[ https://issues.apache.org/jira/browse/ARROW-17398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17580748#comment-17580748 ]
Rok Mihevc edited comment on ARROW-17398 at 8/17/22 11:39 AM:
--------------------------------------------------------------
> That's not directly what I understand from that link. It seems to indicate there is a way to support parsing something like "1999-10-31 00:30:00 US/Pacific PST", but for this issue I think we actually want to parse "1999-10-31 00:30:00 PST"?
You're right. But [date.h docs|https://howardhinnant.github.io/date/date.html#from_stream_formatting] do state that timezone names and abbreviations can be parsed:
{noformat}
%Z The time zone abbreviation or name. A single word is parsed. This word can only contain characters from the basic source character set ([lex.charset] in the C++ standard) that are alphanumeric, or one of '_', '/', '-' or '+'.
{noformat}
> There might also not be an actual solution for this, without requiring more user input (in general, those time zone abbreviations like PST, EST, CET, etc are not fully unambiguous)
Are you referring to DST jumps or "name overloading"? For completeness: [list of timezones including abbreviations|https://en.wikipedia.org/wiki/List_of_tz_database_time_zones].
was (Author: rokm):
> That's not directly what I understand from that link. It seems to indicate there is a way to support parsing something like "1999-10-31 00:30:00 US/Pacific PST", but for this issue I think we actually want to parse "1999-10-31 00:30:00 PST"?
You're right. [date.h docs|https://howardhinnant.github.io/date/date.html#from_stream_formatting] do state that timezone names and abbreviations can be parsed:
{noformat}
%Z The time zone abbreviation or name. A single word is parsed. This word can only contain characters from the basic source character set ([lex.charset] in the C++ standard) that are alphanumeric, or one of '_', '/', '-' or '+'.
{noformat}
> There might also not be an actual solution for this, without requiring more user input (in general, those time zone abbreviations like PST, EST, CET, etc are not fully unambiguous)
Are you referring to DST jumps or "name overloading"? For completeness: [list of timezones including abbreviations|https://en.wikipedia.org/wiki/List_of_tz_database_time_zones].
> [C++] Add support for %Z to strptime
> -------------------------------------
>
> Key: ARROW-17398
> URL: https://issues.apache.org/jira/browse/ARROW-17398
> Project: Apache Arrow
> Issue Type: Improvement
> Components: R
> Reporter: Rok Mihevc
> Priority: Minor
> Labels: kernel
>
> While lubridate does not support %Z flag for strptime Arrow could.
> Changes to C++ kernels might be required for support on all platforms, but that shouldn't block implementation as kStrptimeSupportsZone flag can be used, [see proposal|https://github.com/apache/arrow/pull/13854#issuecomment-1212694663].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)