You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/25 18:47:27 UTC

[GitHub] [arrow] jonkeane commented on pull request #10334: ARROW-12198: [R] bindings for strptime

jonkeane commented on pull request #10334:
URL: https://github.com/apache/arrow/pull/10334#issuecomment-848155516


   Oh, this was a fun one dig through and figure out what was going on. As I'm sure you've seen, the failure is only in the devel build, and _it turns out_ [that `all.equal.POSIXt()`](https://github.com/wch/r-source/blob/79298c499218846d14500255efd622b5021c10ec/src/library/base/R/all.equal.R#L492-L524) has [changed recently](https://github.com/wch/r-source/blob/trunk/doc/NEWS.Rd#L735-L739): https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17277 is the bug report that adds timezone checking. 
   
   Interestingly, [comment 4](https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17277#c4) seems to indicate `check.attributes` should be respected, thought it is not (currently) being respected. I've sent an email to the r-devel list and asking if `check.attributes` is supposed to be ignored in this case (but you can see a replication of this in the code below).
   
   For now, I think if you add `check.tzone = FALSE` to the `expect_equivalent()` calls that will fix this (and not cause problems in other versions).
   
   ```r
   > all.equal(
     list(lubridate::ymd_hms("2018-10-07 19:04:05", tz = NULL)),
     list(lubridate::ymd_hms("2018-10-07 19:04:05")),
     check.attributes = FALSE
   )
   [1] "Component 1: 'tzone' attributes are inconsistent ('' and 'UTC')"
   > all.equal(
     list(lubridate::ymd_hms("2018-10-07 19:04:05", tz = NULL)),
     list(lubridate::ymd_hms("2018-10-07 19:04:05")),
     check.tzone = FALSE
   )
   [1] TRUE
   > 
   ```


-- 
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:
users@infra.apache.org