From 9f6a1d319df5e46a92da7529ebab4eff89b8ccd2 Mon Sep 17 00:00:00 2001 From: ottochen Date: Mon, 7 Sep 2020 09:45:49 +0800 Subject: [PATCH] timestamp : Adjust hour print alignment format --- src/tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty.c b/src/tty.c index 17a4bdb..1716542 100644 --- a/src/tty.c +++ b/src/tty.c @@ -647,7 +647,7 @@ int tty_connect(void) struct tm *tm; gettimeofday(&tv, NULL); tm = localtime(&tv.tv_sec); - sprintf(current_str, "[%-2d:%02d:%02d.%03ld] ", tm->tm_hour, tm->tm_min, tm->tm_sec, tv.tv_usec/1000); + sprintf(current_str, "[%2d:%02d:%02d.%03ld] ", tm->tm_hour, tm->tm_min, tm->tm_sec, tv.tv_usec/1000); fprintf(stdout, ANSI_COLOR_GRAY "%s" ANSI_COLOR_RESET, current_str); next_timestamp = 0; if (option.log && option.timestamp)