The daylight variable is supposed to be set to 1 if DST is every in use for the current time zone. But __tzfile_read does this: __daylight = rule_stdoff != rule_dstoff; This check can fail to set __daylight to 1 if the DST and non-DST offsets happen to be the same. The current tz data for Africa/Tripoli exposes this bug.
Patch posted: [PATCH] time: Set daylight to 1 for matching DST/offset change (bug 29951) <https://sourceware.org/pipermail/libc-alpha/2023-January/144434.html>
Fixed via: commit 35141f304e319109c322f797ae71c0b9420ccb05 Author: Florian Weimer <fweimer@redhat.com> Date: Thu Jan 5 18:21:25 2023 +0100 time: Set daylight to 1 for matching DST/offset change (bug 29951) The daylight variable is supposed to be set to 1 if DST is ever in use for the current time zone. But __tzfile_read used to do this: __daylight = rule_stdoff != rule_dstoff; This check can fail to set __daylight to 1 if the DST and non-DST offsets happen to be the same.