Skip to content

Commit 2685256

Browse files
committed
[libc++][TZDZ] Validates the database version.
It seems one of the tests requires a very recent timezone database. Skip the test when the database is older.
1 parent cbfcfdf commit 2685256

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/get_info.sys_time.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ static void test_indian_kerguelen() {
175175
// Z Indian/Kerguelen 0 - -00 1950
176176
// 5 - +05
177177

178+
// Make sure the entry is present in the database.
179+
if (std::chrono::get_tzdb().version < "2024a")
180+
return;
181+
178182
const std::chrono::time_zone* tz = std::chrono::locate_zone("Indian/Kerguelen");
179183

180184
std::chrono::sys_seconds transition =

0 commit comments

Comments
 (0)