dragosmg commented on a change in pull request #12240:
URL: https://github.com/apache/arrow/pull/12240#discussion_r840515303
##########
File path: r/tests/testthat/test-Array.R
##########
@@ -260,18 +260,30 @@ test_that("array supports POSIXct (ARROW-3340)", {
expect_array_roundtrip(times2, timestamp("us", "US/Eastern"))
})
-test_that("array supports POSIXct without timezone", {
- # Make sure timezone is not set
+test_that("array uses local timezone for POSIXct without timezone", {
withr::with_envvar(c(TZ = ""), {
Review comment:
It is erroring with `Error in assign(".sys.timezone", old, envir =
base_env) : cannot change value of locked binding for '.sys.timezone'`.
I think I am bumping into some cacheing issue.
> As from R 3.5.0, when a time zone location is first found in a session,
its value is cached in object .sys.timezone in the base environment.
AFAICT the caching works (as in it manages to unlock the `.sys.timezone`
object, assign to it and then lock it again). The issue surfaces when
we`return(tz)`.
The ` withr::with_timezone(NA` chunk fails with the same error message when
ran interactively.
--
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]