vogelchr/radioclkd2

Log message shows month wrong

Closed this issue · 1 comments

Hi,
I noticed that the log message is of by 1 month, while decoded time was right:

Dec 26 20:14:00 moonclock radioclkd2: DCF77 time: 2016-11-26 (day 1) 20:14 CET main ant
Dec 26 20:14:00 moonclock radioclkd2: clock: radio time 1482779640.000000, pc time 1482779640.944847
Dec 26 20:14:00 moonclock radioclkd2: shm: storing time 1482779640.000000 local 1482779640.944847 err 0.005000 leap 0

cheers, muetze

Fixed by this commit, thanks for reporting: 382ef56

--- Snip ---
Fix month in logging of DCF77 decode.

tm_mon is 0(Jan)..11(Dec) whereas we humans like to write
our months as 1..12. To make the logging message sane, add 1
to month in debug output.

Spotted by "muetze", thanks for reporting.