Mercurial > hg > index.cgi
changeset 11:38184ef1296d
Make TIME call agree with spec
Time call spec wants months in the range 1-12. Make the code agree with the
spec.
author | William Astle <lost@l-w.ca> |
---|---|
date | Thu, 04 Aug 2016 12:50:12 -0600 |
parents | 36c4cda4b6c4 |
children | f8226a33698d |
files | src/lwwire.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lwwire.c Sat Jul 30 13:16:39 2016 -0600 +++ b/src/lwwire.c Thu Aug 04 12:50:12 2016 -0600 @@ -214,7 +214,7 @@ curtime = time(NULL); tmval = localtime(&curtime); buf[0] = tmval -> tm_year; - buf[1] = tmval -> tm_mon; + buf[1] = tmval -> tm_mon + 1; // spec wants 1-12; localtime() gives 0-11 buf[2] = tmval -> tm_mday; buf[3] = tmval -> tm_hour; buf[4] = tmval -> tm_min;