]> git.ipfire.org Git - thirdparty/chrony.git/commit
leapdb: support leap-seconds.list as second source
authorPatrick Oppenlander <patrick.oppenlander@gmail.com>
Thu, 8 Feb 2024 03:36:28 +0000 (14:36 +1100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 8 Feb 2024 14:54:24 +0000 (15:54 +0100)
commit53823b9f1c076b3b26d0ad031eb95a51e6842abd
tree01b27735b14d297aa7f5ba47da55aff8b585cd22
parent83f90279b0fdd64c1d67d479de5e60ee068b9499
leapdb: support leap-seconds.list as second source

The existing implementation of getting leap second information from a
timezone in get_tz_leap() relies on non-portable C library behaviour.

Specifically, mktime is not required to return '60' in the tm_sec field
when a leap second is inserted leading to "Timezone right/UTC failed
leap second check, ignoring" errors on musl based systems.

This patch adds support for getting leap second information from the
leap-seconds.list file included with tzdata and adds a new configuration
directive leapseclist to switch on the feature.
conf.c
conf.h
doc/chrony.conf.adoc
leapdb.c
refclock.c