From 2076cf883110bd6fc0f87b619005baf2117d6b95 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 16 Jun 2011 21:52:11 +0200 Subject: timedated: sync clock down to RTC where necessary --- src/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 11379f6bb4..045203383d 100644 --- a/src/main.c +++ b/src/main.c @@ -1050,11 +1050,14 @@ int main(int argc, char *argv[]) { if (label_init() < 0) goto finish; - if (hwclock_is_localtime()) { + if (hwclock_is_localtime() > 0) { int min; min = hwclock_apply_localtime_delta(); - log_info("Hwclock configured in localtime, applying delta of %i minutes to system time", min); + if (min < 0) + log_error("Failed to apply local time delta: %s", strerror(-min)); + else + log_info("RTC configured in localtime, applying delta of %i minutes to system time.", min); } } else { arg_running_as = MANAGER_USER; -- cgit v1.2.3-54-g00ecf