From: Yu Watanabe Date: Tue, 12 Jan 2021 12:00:27 +0000 (+0900) Subject: timedate: actually reset system time with new timezone X-Git-Tag: v248-rc1~366 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df49792e01c2f6e49f21271e4d0abe0723b854b3;p=thirdparty%2Fsystemd.git timedate: actually reset system time with new timezone Fix a bug introduced by 56b0ef2fc283425df6ae6f1dc198e0c408f70471. Closes CID#1436943. --- 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");