@@ -1299,6 +1299,78 @@ static void test_america_indiana_knox() {
1299
1299
tz->get_info (to_sys_seconds (2006y, std::chrono::October, 29d, 6h, 59min, 59s)));
1300
1300
}
1301
1301
1302
+ static void test_america_punta_arenas () {
1303
+ // Z America/Punta_Arenas -4:43:40 - LMT 1890
1304
+ // ...
1305
+ // -4 - -04 1919 Jul
1306
+ // -4:42:45 - SMT 1927 S
1307
+ // -5 x -05/-04 1932 S
1308
+ // ...
1309
+ //
1310
+ // R x 1927 1931 - S 1 0 1 -
1311
+ // R x 1928 1932 - Ap 1 0 0 -
1312
+ // ...
1313
+
1314
+ using namespace std ::literals::chrono_literals;
1315
+ const std::chrono::time_zone* tz = std::chrono::locate_zone (" America/Punta_Arenas" );
1316
+
1317
+ assert_equal (
1318
+ std::chrono::sys_info (
1319
+ to_sys_seconds (1927y, std::chrono::September, 1d, 4h, 42min, 45s),
1320
+ to_sys_seconds (1928y, std::chrono::April, 1d, 4h),
1321
+ -4h,
1322
+ 60min,
1323
+ " -04" ),
1324
+ tz->get_info (to_sys_seconds (1927y, std::chrono::September, 1d, 4h, 42min, 45s)));
1325
+
1326
+ assert_equal (
1327
+ std::chrono::sys_info (
1328
+ to_sys_seconds (1927y, std::chrono::September, 1d, 4h, 42min, 45s),
1329
+ to_sys_seconds (1928y, std::chrono::April, 1d, 4h),
1330
+ -4h,
1331
+ 60min,
1332
+ " -04" ),
1333
+ tz->get_info (to_sys_seconds (1928y, std::chrono::April, 1d, 3h, 59min, 59s)));
1334
+ }
1335
+
1336
+ static void test_europ_ljubljana () {
1337
+ // Z Europe/Ljubljana 0:58:4 - LMT 1884
1338
+ // 1 - CET 1941 Ap 18 23
1339
+ // 1 c CE%sT 1945 May 8 2s
1340
+ // 1 1 CEST 1945 S 16 2s
1341
+ // 1 - CET 1982 N 27
1342
+ // 1 E CE%sT
1343
+ //
1344
+ // ...
1345
+ // R c 1943 o - O 4 2s 0 -
1346
+ // R c 1944 1945 - Ap M>=1 2s 1 S
1347
+ // R c 1944 o - O 2 2s 0 -
1348
+ // R c 1945 o - S 16 2s 0 -
1349
+ // R c 1977 1980 - Ap Su>=1 2s 1 S
1350
+ // ...
1351
+
1352
+ using namespace std ::literals::chrono_literals;
1353
+ const std::chrono::time_zone* tz = std::chrono::locate_zone (" Europe/Ljubljana" );
1354
+
1355
+ assert_equal (
1356
+ std::chrono::sys_info (
1357
+ to_sys_seconds (1945y, std::chrono::April, 2d, 1h),
1358
+ to_sys_seconds (1945y, std::chrono::September, 16d, 1h),
1359
+ 2h,
1360
+ 60min,
1361
+ " CEST" ),
1362
+ tz->get_info (to_sys_seconds (1945y, std::chrono::April, 2d, 1h)));
1363
+
1364
+ assert_equal (
1365
+ std::chrono::sys_info (
1366
+ to_sys_seconds (1945y, std::chrono::April, 2d, 1h),
1367
+ to_sys_seconds (1945y, std::chrono::September, 16d, 1h),
1368
+ 2h,
1369
+ 60min,
1370
+ " CEST" ),
1371
+ tz->get_info (to_sys_seconds (1945y, std::chrono::September, 16d, 0h, 59min, 59s)));
1372
+ }
1373
+
1302
1374
int main (int , const char **) {
1303
1375
// Basic tests
1304
1376
test_gmt ();
@@ -1333,5 +1405,9 @@ int main(int, const char**) {
1333
1405
test_america_ciudad_juarez ();
1334
1406
test_america_indiana_knox ();
1335
1407
1408
+ // Reverse search bugs
1409
+ test_america_punta_arenas ();
1410
+ test_europ_ljubljana ();
1411
+
1336
1412
return 0 ;
1337
1413
}
0 commit comments