You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "SHIMA Tatsuya (Jira)" <ji...@apache.org> on 2022/08/15 18:03:00 UTC

[jira] [Updated] (ARROW-17424) [R] Microsecond is not sufficient units for POSIXct

     [ https://issues.apache.org/jira/browse/ARROW-17424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

SHIMA Tatsuya updated ARROW-17424:
----------------------------------
    Summary: [R] Microsecond is not sufficient units for POSIXct  (was: [R] Microseconds are not sufficient units for POSIXct)

> [R] Microsecond is not sufficient units for POSIXct
> ---------------------------------------------------
>
>                 Key: ARROW-17424
>                 URL: https://issues.apache.org/jira/browse/ARROW-17424
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: R
>    Affects Versions: 9.0.0
>            Reporter: SHIMA Tatsuya
>            Priority: Major
>
> I believe the {{POSIXct}} type or R currently corresponds to the Arrow {{timestamp[us, tz=UTC]}} type.
> {code:r}
> lubridate::as_datetime(0) |> arrow::infer_type()
> #> Timestamp
> #> timestamp[us, tz=UTC]
> {code}
> However, as shown below, POSIXct may hold data finer than a microsecond.
> {code:r}
> lubridate::as_datetime(0.000000001) |> as.numeric()
> #> [1] 1e-09
> lubridate::as_datetime("1970-01-01 00:00:00.0000001") |> as.numeric()
> #> [1] 1.192093e-07
> {code}
> I don't know why it is currently set in microseconds, but is there any reason not to set it in nanoseconds?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)