summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/clock-util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/basic/clock-util.c b/src/basic/clock-util.c
index dd6c043af9..7fe8d35ea5 100644
--- a/src/basic/clock-util.c
+++ b/src/basic/clock-util.c
@@ -91,7 +91,8 @@ int clock_is_localtime(const char* adjtime_path) {
fgets(line, sizeof(line), f) &&
fgets(line, sizeof(line), f);
if (!b)
- return -EIO;
+ /* less than three lines -> default to UTC */
+ return 0;
truncate_nl(line);
return streq(line, "LOCAL");
@@ -99,6 +100,7 @@ int clock_is_localtime(const char* adjtime_path) {
} else if (errno != ENOENT)
return -errno;
+ /* adjtime not present -> default to UTC */
return 0;
}