wjones127 commented on a change in pull request #12536:
URL: https://github.com/apache/arrow/pull/12536#discussion_r818932698



##########
File path: r/R/arrow-package.R
##########
@@ -65,6 +65,14 @@
     # Disable multithreading on Windows
     # See https://issues.apache.org/jira/browse/ARROW-8379
     options(arrow.use_threads = FALSE)
+
+    # Try to set timezone database
+    if (requireNamespace("tzdb", quietly = TRUE)) {
+      tzdb::tzdb_initialize()
+      set_timezone_database(tzdb::tzdb_path("text"))
+    } else {
+      warning("tzdb not installed. Timezones will not be available.")
+    }

Review comment:
       @nealrichardson  @paleolimbot the R CMD CHECK doesn't seem to like us 
referencing `tzdb::` in `onLoad`. ([See this CI 
job](https://github.com/apache/arrow/runs/5400279568?check_suite_focus=true#step:6:1162).)
 Any thoughts on a better way to handle an optional dependency? (I think we 
only need this on Windows.) 




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


Reply via email to