[Libwebsockets] lwsl_timestamp month one-off error (patch)
fabian at fkurz.net
Tue May 31 10:14:38 CEST 2016
just noticed that the months in libwebsockets debugging timestamps
are wrong (amazing how long it took me to notice it - but seeing
the 31st of April finally did it).
| $ libwebsockets-test-client
| [2016/04/31 10:05:16:5331] NOTICE: libwebsockets test client - license LGPL2.1+SLE
I suppose this trivial patch fixes it; tm_mon is zero based (at least
on Linux, but I'd be surprised if it's different on Win32 etc.).
diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c
index 43ede68..fcf4674 100644
@@ -1173,7 +1173,7 @@ lwsl_timestamp(int level, char *p, int len)
n = snprintf(p, len,
ptm->tm_year + 1900,
+ ptm->tm_mon + 1,
Best regards and thank you so much for providing libwebsockets!
Fabian Kurz, DJ1YFK Munich, Germany
fabian at fkurz.net +49 176 24079617
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 609 bytes
Desc: not available
More information about the Libwebsockets