TODO(GH-48593): Remove when libc++ supports std::chrono timezone https://github.com/apache/arrow/issues/48593
| 89 | // TODO(GH-48593): Remove when libc++ supports std::chrono timezone |
| 90 | // https://github.com/apache/arrow/issues/48593 |
| 91 | Status Initialize(const GlobalOptions& options) noexcept { |
| 92 | ARROW_SUPPRESS_DEPRECATION_WARNING |
| 93 | if (options.timezone_db_path.has_value()) { |
| 94 | #if !USE_OS_TZDB |
| 95 | try { |
| 96 | arrow_vendored::date::set_install(options.timezone_db_path.value()); |
| 97 | arrow_vendored::date::reload_tzdb(); |
| 98 | } catch (const std::runtime_error& e) { |
| 99 | return Status::IOError(e.what()); |
| 100 | } |
| 101 | timezone_db_path = options.timezone_db_path.value(); |
| 102 | #else |
| 103 | return Status::Invalid( |
| 104 | "Arrow was set to use OS timezone database at compile time, " |
| 105 | "so a downloaded database cannot be provided at runtime."); |
| 106 | #endif // !USE_OS_TZDB |
| 107 | } |
| 108 | ARROW_UNSUPPRESS_DEPRECATION_WARNING |
| 109 | return Status::OK(); |
| 110 | } |
| 111 | |
| 112 | } // namespace arrow |
no test coverage detected