dragosmg commented on a change in pull request #12240:
URL: https://github.com/apache/arrow/pull/12240#discussion_r792808805
##########
File path: r/R/array.R
##########
@@ -188,6 +188,11 @@ Array$create <- function(x, type = NULL) {
return(out)
}
+ if (inherits(x, "POSIXct") && attr(x, "tzone") == "") {
+ attr(x, "tzone") <- Sys.timezone()
Review comment:
It's a bit confusing, but if you add a numeric vector to a POSIXlt
object then the result is a POSIXct.
``` r
a <- strptime("2020-01-01", format = "%Y-%m-%d") + 1
class(a)
#> [1] "POSIXct" "POSIXt"
```
<sup>Created on 2022-01-26 by the [reprex
package](https://reprex.tidyverse.org) (v2.0.1)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]