Skip to content

Commit 6328db3

Browse files
committed
Remove windows tz workarounds
1 parent 58fac16 commit 6328db3

File tree

23 files changed

+3
-291
lines changed

23 files changed

+3
-291
lines changed

.github/workflows/cpp.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,6 @@ jobs:
366366
run: |
367367
export CMAKE_BUILD_PARALLEL_LEVEL=$NUMBER_OF_PROCESSORS
368368
ci/scripts/cpp_build.sh "$(pwd)" "$(pwd)/build"
369-
- name: Download Timezone Database
370-
shell: bash
371-
run: ci/scripts/download_tz_database.sh
372369
- name: Download MinIO
373370
shell: msys2 {0}
374371
run: |

.github/workflows/cpp_extra.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,6 @@ jobs:
365365
with:
366366
fetch-depth: 0
367367
submodules: recursive
368-
- name: Download Timezone Database
369-
shell: bash
370-
run: ci/scripts/download_tz_database.sh
371368
- name: Install cmake
372369
shell: bash
373370
run: |

.github/workflows/matlab.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ jobs:
147147
uses: matlab-actions/setup-matlab@v2
148148
with:
149149
release: R2025b
150-
- name: Download Timezone Database
151-
shell: bash
152-
run: ci/scripts/download_tz_database.sh
153150
- name: Install ccache
154151
shell: bash
155152
run: ci/scripts/install_ccache.sh 4.6.3 /usr

.github/workflows/verify_rc.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ jobs:
228228
run: |
229229
choco install --no-progress --yes boost-msvc-14.1
230230
choco install --no-progress --yes wget
231-
- name: Download Timezone Database
232-
shell: bash
233-
run: ci/scripts/download_tz_database.sh
234231
- name: Run verification
235232
env:
236233
GH_TOKEN: ${{ github.token }}

ci/scripts/download_tz_database.sh

100755100644
File mode changed.

cpp/src/arrow/compute/function_test.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,9 @@ TEST(FunctionOptions, Equality) {
9595
options.emplace_back(new StrptimeOptions("%Y", TimeUnit::type::MILLI, true));
9696
options.emplace_back(new StrptimeOptions("%Y", TimeUnit::type::NANO));
9797
options.emplace_back(new StrftimeOptions("%Y-%m-%dT%H:%M:%SZ", "C"));
98-
#ifndef _WIN32
9998
options.emplace_back(new AssumeTimezoneOptions(
10099
"Europe/Amsterdam", AssumeTimezoneOptions::Ambiguous::AMBIGUOUS_RAISE,
101100
AssumeTimezoneOptions::Nonexistent::NONEXISTENT_RAISE));
102-
#endif
103101
options.emplace_back(new PadOptions(5, " "));
104102
options.emplace_back(new PadOptions(10, "A"));
105103
options.emplace_back(new PadOptions(10, "A", false));

cpp/src/arrow/compute/kernels/scalar_cast_test.cc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,15 +2358,7 @@ constexpr char kTimestampSecondsJson[] =
23582358
constexpr char kTimestampExtremeJson[] =
23592359
R"(["1677-09-20T00:00:59.123456", "2262-04-13T23:23:23.999999"])";
23602360

2361-
class CastTimezone : public ::testing::Test {
2362-
protected:
2363-
void SetUp() override {
2364-
#ifdef _WIN32
2365-
// Initialize timezone database on Windows
2366-
ASSERT_OK(InitTestTimezoneDatabase());
2367-
#endif
2368-
}
2369-
};
2361+
class CastTimezone : public ::testing::Test {};
23702362

23712363
TEST(Cast, TimestampToDate) {
23722364
// See scalar_temporal_test.cc

cpp/src/arrow/compute/kernels/scalar_temporal_test.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -412,14 +412,6 @@ class ScalarTemporalTest : public ::testing::Test {
412412
RoundTemporalOptions round_to_15_quarters =
413413
RoundTemporalOptions(15, CalendarUnit::QUARTER);
414414
RoundTemporalOptions round_to_15_years = RoundTemporalOptions(15, CalendarUnit::YEAR);
415-
416-
protected:
417-
void SetUp() override {
418-
#ifdef _WIN32
419-
// Initialize timezone database on Windows
420-
ASSERT_OK(InitTestTimezoneDatabase());
421-
#endif
422-
}
423415
};
424416

425417
class ScalarTemporalTestStrictCeil : public ScalarTemporalTest {

cpp/src/arrow/config.cc

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ std::string MakeSimdLevelString(QueryFlagFunction&& query_flag) {
6464
}
6565
}
6666

67-
std::optional<std::string> timezone_db_path;
68-
6967
}; // namespace
7068

7169
const BuildInfo& GetBuildInfo() { return kBuildInfo; }
@@ -77,32 +75,7 @@ RuntimeInfo GetRuntimeInfo() {
7775
MakeSimdLevelString([&](int64_t flags) { return cpu_info->IsSupported(flags); });
7876
info.detected_simd_level =
7977
MakeSimdLevelString([&](int64_t flags) { return cpu_info->IsDetected(flags); });
80-
info.using_os_timezone_db = USE_OS_TZDB;
81-
#if !USE_OS_TZDB
82-
info.timezone_db_path = timezone_db_path;
83-
#else
84-
info.timezone_db_path = std::optional<std::string>();
85-
#endif
8678
return info;
8779
}
8880

89-
Status Initialize(const GlobalOptions& options) noexcept {
90-
if (options.timezone_db_path.has_value()) {
91-
#if !USE_OS_TZDB
92-
try {
93-
arrow_vendored::date::set_install(options.timezone_db_path.value());
94-
arrow_vendored::date::reload_tzdb();
95-
} catch (const std::runtime_error& e) {
96-
return Status::IOError(e.what());
97-
}
98-
timezone_db_path = options.timezone_db_path.value();
99-
#else
100-
return Status::Invalid(
101-
"Arrow was set to use OS timezone database at compile time, "
102-
"so a downloaded database cannot be provided at runtime.");
103-
#endif // !USE_OS_TZDB
104-
}
105-
return Status::OK();
106-
}
107-
10881
} // namespace arrow

cpp/src/arrow/config.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ struct RuntimeInfo {
6464

6565
/// The SIMD level available on the OS and CPU
6666
std::string detected_simd_level;
67-
68-
/// Whether using the OS-based timezone database
69-
/// This is set at compile-time.
70-
bool using_os_timezone_db;
71-
72-
/// The path to the timezone database; by default None.
73-
std::optional<std::string> timezone_db_path;
7467
};
7568

7669
/// \brief Get runtime build info.
@@ -86,13 +79,4 @@ const BuildInfo& GetBuildInfo();
8679
ARROW_EXPORT
8780
RuntimeInfo GetRuntimeInfo();
8881

89-
struct GlobalOptions {
90-
/// Path to text timezone database. This is only configurable on Windows,
91-
/// which does not have a compatible OS timezone database.
92-
std::optional<std::string> timezone_db_path;
93-
};
94-
95-
ARROW_EXPORT
96-
Status Initialize(const GlobalOptions& options) noexcept;
97-
9882
} // namespace arrow

0 commit comments

Comments
 (0)