[ 
https://issues.apache.org/jira/browse/ARROW-15602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17488855#comment-17488855
 ] 

SHIMA Tatsuya commented on ARROW-15602:
---------------------------------------

Thank you for checking this.

Note that `readr::read_csv` and `pyarrow.csv.read_csv` can read this without 
specifying any options.
{code:r}
tf <- tempfile()
writeLines("x \n 2004-04-01T12:00+09:00", tf)
readr::read_csv(tf)
#> Rows: 1 Columns: 1
#> ── Column specification 
────────────────────────────────────────────────────────
#> Delimiter: ","
#> dttm (1): x
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this 
message.
#> # A tibble: 1 × 1
#>   x
#>   <dttm>
#> 1 2004-04-01 03:00:00
arrow::read_csv_arrow(tf)
#> # A tibble: 1 × 1
#>   `x `
#>   <chr>
#> 1 " 2004-04-01T12:00+09:00"
{code}
{code:python}
>>> import pyarrow.csv
>>> pyarrow.csv.read_csv("tmp.csv")
pyarrow.Table
x: timestamp[s, tz=UTC]
----
x: [[2004-04-01 03:00:00]]
{code}

> [R] can't read timestamp with timezone from CSV (or other delimited) file
> -------------------------------------------------------------------------
>
>                 Key: ARROW-15602
>                 URL: https://issues.apache.org/jira/browse/ARROW-15602
>             Project: Apache Arrow
>          Issue Type: Improvement
>         Environment: R version 4.1.2 (2021-11-01)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 20.04.3 LTS
>            Reporter: SHIMA Tatsuya
>            Priority: Major
>
> The following values in a csv file can be read as timestamp by 
> `pyarrow.csv.read_csv` and `readr::read_csv`, but not by 
> `arrow::read_csv_arrow`.
> {code}
> "x"
> "2004-04-01T12:00+09:00"
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to