summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index a0fbdc517e..3187ec3768 100644
--- a/src/util.c
+++ b/src/util.c
@@ -4905,7 +4905,7 @@ int hwclock_is_localtime(void) {
return local;
}
-int hwclock_apply_localtime_delta(void) {
+int hwclock_apply_localtime_delta(int *min) {
const struct timeval *tv_null = NULL;
struct timespec ts;
struct tm *tm;
@@ -4926,8 +4926,9 @@ int hwclock_apply_localtime_delta(void) {
*/
if (settimeofday(tv_null, &tz) < 0)
return -errno;
-
- return minuteswest;
+ if (min)
+ *min = minuteswest;
+ return 0;
}
int hwclock_reset_localtime_delta(void) {