commit bd544952fde6aaadf4917b6c0d7a22a1ed956766
parent f142064a1718d39759836d64ea248fc82a49c417
Author: FRIGN <dev@frign.de>
Date: Sat, 9 Aug 2014 21:03:55 +0200
Switch to strftime
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/quark.c b/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;
}