From df49792e01c2f6e49f21271e4d0abe0723b854b3 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 12 Jan 2021 21:00:27 +0900 Subject: [PATCH] timedate: actually reset system time with new timezone Fix a bug introduced by 56b0ef2fc283425df6ae6f1dc198e0c408f70471. Closes CID#1436943. --- src/timedate/timedated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 8bfcfd5cdc3..8149facb346 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -771,7 +771,7 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error log_debug_errno(r, "Failed to get hardware clock, ignoring: %m"); else { /* And set the system clock with this */ - mktime_or_timegm(&tm, !c->local_rtc); + ts.tv_sec = mktime_or_timegm(&tm, !c->local_rtc); if (clock_settime(CLOCK_REALTIME, &ts) < 0) log_debug_errno(errno, "Failed to update system clock, ignoring: %m"); -- 2.47.3