summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-05-24 20:23:07 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-05-24 20:23:07 +0200
commit7948c4dfbea73ac21250b588089039aa17a90386 (patch)
treeaffd1ba0a14936f4c19452fd1219c8c65dc137fc /src/util.h
parent359306dfe552228716b8da5cf989da8d0e23a297 (diff)
rtc in localtime: use settimeofday(NULL, tz) instead of hwclock(8)
We check for LOCAL in /etc/adjtime and if needed, ask the kernel to apply the timezone delta to the system clock. The very first call of settimeofday() without a time, but a timezone warps the system clock, so that it properly runs in UTC.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 04049f7d92..79d634bb63 100644
--- a/src/util.h
+++ b/src/util.h
@@ -451,4 +451,13 @@ int signal_from_string(const char *s);
int signal_from_string_try_harder(const char *s);
int conf_files_list(char ***strv, const char *suffix, const char *dir, ...);
+
+bool hwclock_is_localtime(void);
+
+int hwclock_apply_localtime_delta(void);
+
+int hwclock_get_time(struct tm *tm);
+
+int hwclock_set_time(const struct tm *tm);
+
#endif