[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.
This commit is contained in:
Mark de Wever 2024-04-13 16:08:07 +02:00
parent cbfcfdf75e
commit 26852565a5

View File

@ -175,6 +175,10 @@ static void test_indian_kerguelen() {
// Z Indian/Kerguelen 0 - -00 1950
// 5 - +05
// Make sure the entry is present in the database.
if (std::chrono::get_tzdb().version < "2024a")
return;
const std::chrono::time_zone* tz = std::chrono::locate_zone("Indian/Kerguelen");
std::chrono::sys_seconds transition =