Disable variable change within if-loop?

Not seeing the rest of the code, you should use a state variable. If you are setting the clock, then you just have another logic for that in an else statement (or skip the hour++ line). Hmm, I guess that could work.
if (!setting)
hour++;

For me it would be easier to understand the programming logic like this if there was a single variable that held the seconds since midnight. Then you can just convert that into hours, minutes and seconds when need be. When you are setting the hours, you would need to calculate what that is. Maybe that's just me..