# HG changeset patch # User William Astle # Date 1470336612 21600 # Node ID 38184ef1296ded46a35e5884b4bd06178d3db32c # Parent 36c4cda4b6c47e54c844223ad069cd7b37ecf8ca Make TIME call agree with spec Time call spec wants months in the range 1-12. Make the code agree with the spec. diff -r 36c4cda4b6c4 -r 38184ef1296d src/lwwire.c --- 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;