mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Output timestamps in yaml to the microsecond if -u is specified.
This commit is contained in:
@@ -675,15 +675,25 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
||||
|
||||
if (!isc_time_isepoch(&query->time_sent)) {
|
||||
char tbuf[100];
|
||||
isc_time_formatISO8601ms(&query->time_sent, tbuf,
|
||||
sizeof(tbuf));
|
||||
if (query->lookup->use_usec) {
|
||||
isc_time_formatISO8601us(&query->time_sent,
|
||||
tbuf, sizeof(tbuf));
|
||||
} else {
|
||||
isc_time_formatISO8601ms(&query->time_sent,
|
||||
tbuf, sizeof(tbuf));
|
||||
}
|
||||
printf(" query_time: !!timestamp %s\n", tbuf);
|
||||
}
|
||||
|
||||
if (!isquery && !isc_time_isepoch(&query->time_recv)) {
|
||||
char tbuf[100];
|
||||
isc_time_formatISO8601ms(&query->time_recv, tbuf,
|
||||
sizeof(tbuf));
|
||||
if (query->lookup->use_usec) {
|
||||
isc_time_formatISO8601us(&query->time_recv,
|
||||
tbuf, sizeof(tbuf));
|
||||
} else {
|
||||
isc_time_formatISO8601ms(&query->time_recv,
|
||||
tbuf, sizeof(tbuf));
|
||||
}
|
||||
printf(" response_time: !!timestamp %s\n", tbuf);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user