I have program that outputs a 12 & 24 hour Clock side by side with a users options menu to allow user to add an hour, a minute, and a second to both clocks. The issue I am having is that when the hour reaches 12 the standard clock looks like the 24 hour format. That is, instead of it displaying the time as 12:36:45 AM it displays 00:36:45 AM. If the clock reads 00:36:45 and then I choose to add one hour it displays correctly 01:36:45 AM. I have only provided one section of my code. I have tried researching the issue and attempted to fix it on my own and have had no luck. If
Maybe step away again and consider that it's kind of dumb to have all these reimplementations of virtually identical algorithms. The only difference between 12- and 24-hour time is how they are displayed and read in. I would just store the seconds since midnight and a bool that determines if we should display as 12- or 24-hour time. Also, there's no reason to limit your "addXXX" functions to only be able to add 1 unit.