vogelchr / radioclkd2

Quick and dirty fork of http://www.jonatkins.com/page/software/radioclkd2 adding Linux GPIO pin support.
19 stars 7 forks source link

Log message shows month wrong #4

Closed muetze closed 7 years ago

muetze commented 7 years ago

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

vogelchr commented 7 years ago

Fixed by this commit, thanks for reporting: 382ef56a85fb2795a6b1b2afc41ca671c06814d4

--- 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.