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:
parent
686a9ee8e7
commit
30acc87b7d
1 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ static int _alpm_log_leader(FILE *f, const char *prefix)
|
||||||
char timestamp[length];
|
char timestamp[length];
|
||||||
|
|
||||||
/* Use ISO-8601 date format */
|
/* 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);
|
return fprintf(f, "[%s] [%s] ", timestamp, prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue