(David: fix up compile-failure and simplify code a bit)
* in systemctl list-unit-files: show the install value the presets would suggest for a service in a third column
* in systemctl list-unit-files: show the install value the presets would suggest for a service in a third column
-* timedated should compensate on SetTime for the time spent in polkit
-
* figure out when we can use the coarse timers
* sd-resolve: drop res_query wrapping, people should call via the bus to resolved instead
* figure out when we can use the coarse timers
* sd-resolve: drop res_query wrapping, people should call via the bus to resolved instead
Context *c = userdata;
int64_t utc;
struct timespec ts;
Context *c = userdata;
int64_t utc;
struct timespec ts;
+ /* adjust ts for time spent in program */
+ r = sd_bus_message_get_monotonic_usec(m, &start);
+ if (r < 0 && r != -ENODATA)
+ return r;
+ if (r >= 0)
+ timespec_store(&ts, timespec_load(&ts) + (now(CLOCK_MONOTONIC) - start));
+
/* Set system clock */
if (clock_settime(CLOCK_REALTIME, &ts) < 0) {
log_error_errno(errno, "Failed to set local time: %m");
/* Set system clock */
if (clock_settime(CLOCK_REALTIME, &ts) < 0) {
log_error_errno(errno, "Failed to set local time: %m");
+ (void)sd_bus_negotiate_timestamp(bus, true);
+
r = context_read_data(&context);
if (r < 0) {
log_error_errno(r, "Failed to read time zone data: %m");
r = context_read_data(&context);
if (r < 0) {
log_error_errno(r, "Failed to read time zone data: %m");