Several problems:
You should be checking >= 60, not > 60.
Incrementing hours when the seconds total over 60 is not good, increment $tmin instead. And you do have to handle seconds overflow first, and then minutes, or you can be left with minutes of 60 or end up dropping an hour.
I wouldn't bother with if blocks, just: