]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use Europe/Helsinki instead of Europe/Kyiv in test-calendarspec
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 6 Aug 2025 13:33:10 +0000 (14:33 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Sep 2025 10:10:48 +0000 (12:10 +0200)
Europe/Kyiv was added somewhat recently. Use Europe/Helsinki which is
much older and thus works with older tzdata like version 2022a.

line 193: "2016-03-27 03:17:00" new_tz=:Europe/Kyiv
At: Sun 2016-03-27 03:17:00.000000 Europe
Assertion 'r == -ENOENT' failed at src/test/test-calendarspec.c:70, function _test_next(). Aborting.

Follow-up for aa077884c13769ae3bd6aa98978b4ac9e64b5365

(cherry picked from commit f391d6c9ba1277a2d148f30db18fc615763a834d)

src/test/test-calendarspec.c

index 97d274a828bd7fcdf3896ebe3faf4e1742ac60a6..e5004afe7cf1d6e824db4d2bb24105449f7bf933 100644 (file)
@@ -186,16 +186,16 @@ TEST(calendar_spec_one) {
 TEST(calendar_spec_next) {
         test_next("2016-03-27 03:17:00", "", 12345, 1459048620000000);
         test_next("2016-03-27 03:17:00", "Europe/Berlin", 12345, 1459041420000000);
-        test_next("2016-03-27 03:17:00", "Europe/Kyiv", 12345, -1);
+        test_next("2016-03-27 03:17:00", "Europe/Helsinki", 12345, -1);
         test_next("2016-03-27 03:17:00 UTC", NULL, 12345, 1459048620000000);
         test_next("2016-03-27 03:17:00 UTC", "", 12345, 1459048620000000);
         test_next("2016-03-27 03:17:00 UTC", "Europe/Berlin", 12345, 1459048620000000);
-        test_next("2016-03-27 03:17:00 UTC", "Europe/Kyiv", 12345, 1459048620000000);
-        test_next("2016-03-27 03:17:00.420000001 UTC", "Europe/Kyiv", 12345, 1459048620420000);
-        test_next("2016-03-27 03:17:00.4200005 UTC", "Europe/Kyiv", 12345, 1459048620420001);
-        test_next("2015-11-13 09:11:23.42", "Europe/Kyiv", 12345, 1447398683420000);
-        test_next("2015-11-13 09:11:23.42/1.77", "Europe/Kyiv", 1447398683420000, 1447398685190000);
-        test_next("2015-11-13 09:11:23.42/1.77", "Europe/Kyiv", 1447398683419999, 1447398683420000);
+        test_next("2016-03-27 03:17:00 UTC", "Europe/Helsinki", 12345, 1459048620000000);
+        test_next("2016-03-27 03:17:00.420000001 UTC", "Europe/Helsinki", 12345, 1459048620420000);
+        test_next("2016-03-27 03:17:00.4200005 UTC", "Europe/Helsinki", 12345, 1459048620420001);
+        test_next("2015-11-13 09:11:23.42", "Europe/Helsinki", 12345, 1447398683420000);
+        test_next("2015-11-13 09:11:23.42/1.77", "Europe/Helsinki", 1447398683420000, 1447398685190000);
+        test_next("2015-11-13 09:11:23.42/1.77", "Europe/Helsinki", 1447398683419999, 1447398683420000);
         test_next("Sun 16:00:00", "Europe/Berlin", 1456041600123456, 1456066800000000);
         test_next("*-04-31", "", 12345, -1);
         test_next("2016-02~01 UTC", "", 12345, 1456704000000000);
@@ -215,7 +215,7 @@ TEST(calendar_spec_next) {
         test_next("2017-04-02 03:30:00 Pacific/Auckland", "", 12345, 1491060600000000);
         /* Confirm that timezones in the Spec work regardless of current timezone */
         test_next("2017-09-09 20:42:00 Pacific/Auckland", "", 12345, 1504946520000000);
-        test_next("2017-09-09 20:42:00 Pacific/Auckland", "Europe/Kyiv", 12345, 1504946520000000);
+        test_next("2017-09-09 20:42:00 Pacific/Auckland", "Europe/Helsinki", 12345, 1504946520000000);
         /* Check that we don't start looping if mktime() moves us backwards */
         test_next("Sun *-*-* 01:00:00 Europe/Dublin", "", 1616412478000000, 1617494400000000);
         test_next("Sun *-*-* 01:00:00 Europe/Dublin", "IST", 1616412478000000, 1617494400000000);