RTC ds3231 - 165:165:85

I'm afraid i didn't really read the code, as I'm not familiar with it, it should have been proven or disproven before I came along, and it probably isn't relevant anyway. What I did see is some numbers in there and assumed an LCD is in the mix somewhere, and therefore may be the problem.

I might comment on your last point even so, because thereby hangs a tale.

Years ago I was in exactly the same position as the OP, tearing my hair out because the crazy output. Indeed it was even worse, because everything was fine a couple of days before. So what had changed?

It turned out that the villain was the PC. It had died and I had to swap out the motherboard. The front USB socket on the new mobo was not up to powering Arduino with an LCD. A 9v 1A wall wart fixed the problem.

Don't believe anything till you get it in writing..