]> git.ipfire.org Git - thirdparty/chrony.git/commit
rtc: pass info whether RTC is on UTC as a function parameter
authorAhmad Fatoum <a.fatoum@pengutronix.de>
Mon, 22 Jul 2024 11:40:59 +0000 (13:40 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 4 Dec 2024 11:09:03 +0000 (12:09 +0100)
commit68301238a04616405e1aee21679d7c220f079e91
treeea1dcc72d1d420f56f33211710e37a54f70a21eb
parent13db3d6902b8d02b3f3ce2570251f5ac2c54ad5a
rtc: pass info whether RTC is on UTC as a function parameter

rtc_from_t() and t_from_rtc() call either gmtime or localtime depending
on the value of a global rtc_on_utc variable.

This will not be appropriate anymore when we start exporting functions
that call rtc_from_t() and t_from_rtc() for use outside of rtc_linux.c
as the rtc_on_utc variable may not have been initialized yet or at all.

Therefore make whether the RTC is on UTC a function parameter of these
functions, so the value can be propagated from the callers.
rtc_linux.c