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/06/14 07:33:32 UTC

[GitHub] [arrow] nealrichardson commented on pull request #10495: ARROW-12994: [R] stringr tests fails on non-UTC machines due to strptime defaulting to local timezone and Arrow defaulting to UTC

nealrichardson commented on pull request #10495:
URL: https://github.com/apache/arrow/pull/10495#issuecomment-859685297


   I'm wary of hardcoding UTC in our tests because it opens up all kinds of ways where we might do the wrong thing if you're not on UTC. We've had bug reports about this in the past, and the problem literally was that we were hardcoding UTC in the data translation layer itself. 
   
   Here are some tests I added at that time to test all of the combinations: timezone-naive, UTC, timezone specified but definitely not your timezone (hence Pyonyang): https://github.com/apache/arrow/blob/master/r/tests/testthat/test-Array.R#L253-L292
   
   I'm not sure that we can do the exact same thing here but maybe we can. One of the bugs I recall seeing (aside from the UTC hardcoding) was that R and Arrow appeared to be inconsistent with timezones, but the inconsistency was entirely in the print method: R localizes timezone-naive POSIXt data when it prints it and Arrow just prints as-is, which is only the same as R if you're in UTC. 
   
   If there are limitations or incompatibilities in what Arrow's strptime function does, let's be sure to document them and/or link to JIRAs for addressing the issues.


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