summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-06-16 21:52:11 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-21 19:29:45 +0200
commit2076cf883110bd6fc0f87b619005baf2117d6b95 (patch)
tree07afc8c401160746f3551323009906411e19efab /src/main.c
parentd3fc81bd6a5a046b22600ac1204df220c93d2c15 (diff)
timedated: sync clock down to RTC where necessary
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 5 insertions, 2 deletions
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;