diff options
| author | 2020-02-16 21:09:32 +0000 | |
|---|---|---|
| committer | 2020-02-16 21:09:32 +0000 | |
| commit | f9959b0f424a4da2755d69a763c65b4648598893 (patch) | |
| tree | 6b89eab639ea00376716547f9dfeb21d3d95208a /usr.bin/dig/lib/isc/log.c | |
| parent | unravel isc_time_add and isc_time_subtract (diff) | |
| download | wireguard-openbsd-f9959b0f424a4da2755d69a763c65b4648598893.tar.xz wireguard-openbsd-f9959b0f424a4da2755d69a763c65b4648598893.zip | |
unravel isc_time_formattimestamp
OK millert
Diffstat (limited to 'usr.bin/dig/lib/isc/log.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/log.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/dig/lib/isc/log.c b/usr.bin/dig/lib/isc/log.c index 00762a6d894..0d47ea2bf22 100644 --- a/usr.bin/dig/lib/isc/log.c +++ b/usr.bin/dig/lib/isc/log.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.c,v 1.11 2020/02/16 21:08:59 florian Exp $ */ +/* $Id: log.c,v 1.12 2020/02/16 21:09:32 florian Exp $ */ /*! \file * \author Principal Authors: DCL */ @@ -943,11 +943,11 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category, if ((channel->flags & ISC_LOG_PRINTTIME) != 0 && time_string[0] == '\0') { - struct timespec isctime; + struct timespec now; - TIME_NOW(&isctime); - isc_time_formattimestamp(&isctime, time_string, - sizeof(time_string)); + TIME_NOW(&now); + strftime(time_string, sizeof(time_string), + "%d-%b-%Y %X", localtime(&now.tv_sec)); } if ((channel->flags & ISC_LOG_PRINTLEVEL) != 0 && |
