Switch to strftime
This commit is contained in:
parent
f142064a17
commit
bd544952fd
1 changed files with 2 additions and 3 deletions
5
quark.c
5
quark.c
|
@ -475,11 +475,10 @@ sighandler(int sig) {
|
|||
|
||||
char *
|
||||
tstamp(void) {
|
||||
static char res[25];
|
||||
static char res[30];
|
||||
time_t t = time(NULL);
|
||||
|
||||
memcpy(res, asctime(gmtime(&t)), 24);
|
||||
res[24] = 0;
|
||||
strftime(res, sizeof res, "%a, %d %b %Y %H:%M:%S %Z", localtime(&t));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue