chiark / gitweb /
timedatectl: get time values from the service instead of the client
[elogind.git] / src / timedate / timedated.c
index 9858f5694c79a329c9a921daceebd7d88f710744..62d79e2ebb5d1fe82b24d4d4253e9f74bc5beadc 100644 (file)
@@ -477,7 +477,7 @@ static int property_get_rtc_time(
                 sd_bus_error_set_errnof(error, -r, "Failed to read RTC: %s", strerror(-r));
                 return r;
         } else
-                t = (usec_t) mktime(&tm) * USEC_PER_SEC;
+                t = (usec_t) timegm(&tm) * USEC_PER_SEC;
 
         r = sd_bus_message_append(reply, "t", t);
         if (r < 0)