summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-01-12 13:00:27 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-01-12 16:59:33 +0100
commitdf49792e01c2f6e49f21271e4d0abe0723b854b3 (patch)
tree16415d475f11372838c867950dbd6b62b7037af5 /src
parentudev-builtin-blkid: add support for --hint offsets (diff)
downloadsystemd-df49792e01c2f6e49f21271e4d0abe0723b854b3.tar.xz
systemd-df49792e01c2f6e49f21271e4d0abe0723b854b3.zip
timedate: actually reset system time with new timezone
Fix a bug introduced by 56b0ef2fc283425df6ae6f1dc198e0c408f70471. Closes CID#1436943.
Diffstat (limited to 'src')
-rw-r--r--src/timedate/timedated.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 8bfcfd5cdc..8149facb34 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");