use consistent time notation for the log

%X is locale-dependent, making it impossible to reliably parse and
potentially overflowing the buffer.  %T is consistent across locales.

Also fixes some adjacent whitespace.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Andrew Gregory 2019-06-08 12:50:45 -07:00 committed by Allan McRae
parent 686a9ee8e7
commit 30acc87b7d

View file

@ -43,7 +43,7 @@ static int _alpm_log_leader(FILE *f, const char *prefix)
char timestamp[length];
/* Use ISO-8601 date format */
strftime(timestamp,length,"%FT%X%z", tm);
strftime(timestamp,length,"%FT%T%z", tm);
return fprintf(f, "[%s] [%s] ", timestamp, prefix);
}