jonkeane commented on code in PR #49867:
URL: https://github.com/apache/arrow/pull/49867#discussion_r3147281685
##########
r/R/arrow-package.R:
##########
@@ -169,6 +177,18 @@ s3_finalizer <- new.env(parent = emptyenv())
invisible()
}
+configure_tzdb <- function() {
+ if (requireNamespace("tzdb", quietly = TRUE)) {
+ tzdb::tzdb_initialize()
+ set_timezone_database(tzdb::tzdb_path("text"))
+ } else {
+ packageStartupMessage(
+ "The tzdb package is not installed. ",
+ "Timezones will not be available to Arrow compute functions."
Review Comment:
```suggestion
"The tzdb package is not installed. ",
"Timezones will not be available to Arrow compute functions. ",
"If you get errors when using Arrow on datetimes, try running ",
"`install.packages('tzdb')` and trying again."
```
##########
r/R/arrow-package.R:
##########
@@ -169,6 +177,18 @@ s3_finalizer <- new.env(parent = emptyenv())
invisible()
}
+configure_tzdb <- function() {
+ if (requireNamespace("tzdb", quietly = TRUE)) {
+ tzdb::tzdb_initialize()
+ set_timezone_database(tzdb::tzdb_path("text"))
Review Comment:
Should we wrap this in a try/catch and warn if this goes wrong? It would
effectively be the same as if they didn't have it, so it might be nice to not
block folks from using arrow at all.
--
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]