RTC acting strange

Thanks for the advice! This would definitely look a lot cleaner on a PCB, and since they're so cheap maybe I'll just order a new battery holder.

Also thank you very much robtillaart for the updated code! It compiled perfectly the first time, and worked very well in the serial monitor.

The only thing I'm currently stuck on now is the time that is set to the arduino when I compile/upload is about 5 minutes ahead of the actual time. According to the code it should be set exactly to my computers time, but it's consistently ~5 minutes fast, with both robtillaart's code and the unmodified code I've been using. I'm very confused as to what could be causing this error. I've also tried ungrounding the battery each time to 'reset' the DS1307 chip.