Don't trust the clock

With baseball in the closing stages of the postseason, I have nearly abandoned all worthwhile side-projects and focused entirely on my Rockies Horoscope bot. My wtwlt wind vane is still uncalibrated, the careful reviving of my Leap Motion controller is going stale, and somewhere wdpkr is begging for an update to support new search and embedding models.

Those can wait another day because postseason mode is alive and well on Rockiscope!

It was easy to accept the fact that my home team will not make a postseason run in the foreseeable future. It was difficult, however, to accept that my bot would simply go dormant during the most exciting month of baseball. I wanted in on this action, so I spun up a monster update.

In postseason mode, the bot evaluates the rosters of all remaining teams and selects one to adopt based on astrological compatibility. This becomes the new subject for predictions. I'm leaning ALL the way into astrology here. I think I'm beginning to force two worlds together and I really only understand one of them. But I will not give up on the joke, I'm in too deep.

During the game, the bot will pull notable plays and video clips from the MLB API, then give mid-game predictions for the remainder of the game based on the astrological compatibility of the batter and pitcher of the play. I love it.

However it nearly came crashing down today.

A power outage in my office led to the Pi going offline for a moment. This is not uncommon, in fact I built my own website uptime monitor for exactly this type of event.

  • Alarms sounded (a message was posted to a Discord channel)
  • Panic ensured (I noticed the message)
  • All hands on deck to resolve the problem (I plugged the Pi back in)

Power was restored and all self-hosted services on the Pi came back to life. All seemed well until Game 3 of the World Series began. The bot was silent. No prediction, no in-game updates. My streak of predicting the season was in jeopardy.

Logs on the Pi didn't reveal much at first. The bot came alive, checked the game-day schedule and set its time to check in for the pregame prediction:

[rockiscope] 2026/10/26 12:25:14 starting rockiscope v0.9.0
[rockiscope] 2026/10/26 12:25:14 analytics dashboard at http://localhost:8086
[rockiscope] 2026/10/26 12:25:14 live game supervisor started
[rockiscope] 2026/10/26 12:25:14 loaded last post date: 2026-10-06
[rockiscope] 2026/10/26 12:25:14 loaded last reply date: 2026-09-27
[rockiscope] 2026/10/26 12:25:14 prediction engine: 191 games recorded, 99 correct
[rockiscope] 2026/10/26 12:25:14 rockiscope scheduler started
[rockiscope] 2026/10/26 12:25:14 phase: postseason (season 2026, via cache
[rockiscope] 2026/10/26 12:25:15 sleeping for 4h35m0s

It wasn't until I gave a Claude session all of the logs I could around this that I understood the real cause of the missed game. These logs show a local timestamp (that's right, not UTC) of 12:25. However the Pi actually came back online at ~16:09. Nearly 4 hours later than the Pi expected. It had not yet synced its local clock with an NTP server.

This meant that the Pi came online with a stale system time, checked how long it should wait for the scheduled game start, set that duration and slept. After all of this, the system itself actually resolved its local time against an NTP server and effectively fast-forwarded 4 hours. The bot didn't.

This was a cool bug. It's something I would have only run into through self-hosting my service like this. And it's something I wouldn't have found in-time without the help of an AI tool checking my logs for me. At the end of the day the fix was simple, just add a wait for NTP sync from the kernel. But I'll always have a reason to second-guess the clock.