jorisvandenbossche commented on a change in pull request #10334:
URL: https://github.com/apache/arrow/pull/10334#discussion_r633812540



##########
File path: r/tests/testthat/test-Array.R
##########
@@ -291,6 +291,17 @@ test_that("Timezone handling in Arrow roundtrip 
(ARROW-3543)", {
   expect_identical(read_feather(feather_file), df)
 })
 
+test_that("strptime", {
+  # array of strings
+  time_strings <- Array$create(c("2018-10-07 19:04:05", NA))
+  # array of timestamps (doesn't work if tz="" is added!)

Review comment:
       @rok do you know how the system `strptime` handles such a timezone if it 
is present? (the docs don't specify that, and the output struct doesn't have an 
entry for that information)
   
   > Maybe it is expected that if there is a timezone, it will be encoded in 
the string and parseable by strptime (with the right format string)?
   
   The problem here is that *if* a timezone is recorded in the Timestamp type's 
`tz` field, then the timestamp value is expected to be in UTC, and not 
localized to the timezone in question (which is what you get from just parsing 
the string without the timezone information). So basically that means the 
timestamp needs to be converted from the specific timezone to UTC (if 
`strptime` doesn't do that for us). And for now, that's not yet something we 
have implemented, I think (although at some point we probably should?)




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to