mirror of
https://github.com/lammertb/libhttp.git
synced 2025-07-29 21:01:13 +03:00
WebSockCallbacks.c: replace obsolete asctime()
The asctime() function is marked as obsolete by POSIX.1-2008- Replace with recommended strftime(); Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
@ -148,8 +148,7 @@ static void * eventMain(void * arg) {
|
||||
while (ws_ctx->runLoop) {
|
||||
time_t t = time(0);
|
||||
struct tm * timestr = localtime(&t);
|
||||
sprintf(msg,"title %s",asctime(timestr));
|
||||
|
||||
strftime(msg, sizeof(msg), "title %c", timestr);
|
||||
send_to_all_websockets(ctx, msg, strlen(msg));
|
||||
|
||||
mg_sleep(1000);
|
||||
|
Reference in New Issue
Block a user