Commit e19da590 authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman

knotc: zone-status in the time-human-mixed format

parent a57c3fbe
...@@ -254,11 +254,8 @@ static int zone_status(zone_t *zone, ctl_args_t *args) ...@@ -254,11 +254,8 @@ static int zone_status(zone_t *zone, ctl_args_t *args)
} else if (ev_time <= time(NULL)) { } else if (ev_time <= time(NULL)) {
ret = snprintf(buff, sizeof(buff), "pending"); ret = snprintf(buff, sizeof(buff), "pending");
} else { } else {
ev_time -= time(NULL); ret = knot_time_print(TIME_PRINT_HUMAN_MIXED,
ret = snprintf(buff, sizeof(buff), "in %lldh%lldm%llds", ev_time, buff, sizeof(buff));
(long long)(ev_time / 3600),
(long long)(ev_time % 3600) / 60,
(long long)(ev_time % 60));
} }
if (ret < 0 || ret >= sizeof(buff)) { if (ret < 0 || ret >= sizeof(buff)) {
return KNOT_ESPACE; return KNOT_ESPACE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment