jorisvandenbossche commented on a change in pull request #12240:
URL: https://github.com/apache/arrow/pull/12240#discussion_r791773567
##########
File path: r/tests/testthat/test-Array.R
##########
@@ -985,3 +985,14 @@ test_that("Array to C-interface", {
delete_arrow_schema(schema_ptr)
delete_arrow_array(array_ptr)
})
+
+test_that("Array coverts timestamps with missing timezone /assumed local tz
correctly", {
+ withr::with_envvar(c(TZ = "America/Chicago"), {
+ a <- as.POSIXct("1970-01-01 00:00:00")
+ attr(a, "tzone") <- Sys.getenv("TZ")
Review comment:
> but rather the UTC date-time corresponding to the _absolute value_
with the desired timezone label, which I think it would be terribly confusing.
You need to offset for the confusing display in Arrow. Assuming that is
fixed, would the result still be confusing?
##########
File path: r/tests/testthat/test-Array.R
##########
@@ -985,3 +985,14 @@ test_that("Array to C-interface", {
delete_arrow_schema(schema_ptr)
delete_arrow_array(array_ptr)
})
+
+test_that("Array coverts timestamps with missing timezone /assumed local tz
correctly", {
+ withr::with_envvar(c(TZ = "America/Chicago"), {
+ a <- as.POSIXct("1970-01-01 00:00:00")
+ attr(a, "tzone") <- Sys.getenv("TZ")
Review comment:
> The phrase "the display" here is confusing / wrong in some
circumstances. When printing arrays, currently AFAICT arrow prints the
timestamp in UTC for datetimes regardless if there is a timezone attached or not
Yes, that's what I meant. And indeed this is only for the _arrow_ display /
pretty printing.
I think the relevant issue for this is
https://issues.apache.org/jira/browse/ARROW-14567
--
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]