test-time-util: restore relaxation of check is special timezones

Fixup for 514fa9d39a. We are now getting
failures in CI i386 builds in Fedora rawhide:
  TZ=Europe/Lisbon, tzname[0]=WET, tzname[1]=WEST
  @212545617716594 → Sun 1976-09-26 00:26:57 WET → @212542017000000 → Sun 1976-09-26 00:26:57 CET
  src/test/test-time-util.c:450: Assertion failed: Expected "ignore" to be true

Restore the conditionalization for CAT, EAT, WET that was removed
in the refactoring.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-03-19 14:36:22 +00:00
committed by Luca Boccassi
parent 2f44726924
commit bcb65f4b57
+1 -1
View File
@@ -439,7 +439,7 @@ static void test_format_timestamp_impl(usec_t x) {
* Also, the same may happen on MSK timezone (e.g. Europe/Volgograd or Europe/Kirov). */
bool ignore =
(streq_ptr(getenv("TZ"), "Africa/Windhoek") ||
streq_ptr(get_tzname(/* dst= */ false), "MSK")) &&
STRPTR_IN_SET(get_tzname(/* dst= */ false), "CAT", "EAT", "MSK", "WET")) &&
(x_sec > y_sec ? x_sec - y_sec : y_sec - x_sec) == 3600;
log_full(ignore ? LOG_WARNING : LOG_ERR,