Hi,
Assuming you are doing 12 hour time, you would use a 0 to 9 counter for the one's hour digit and a flip flop for the tens of hours digit.
You would have to detect when the ones digit goes to a "3" and when the tens of hours goes to a "1" with a NAND gate or combination of NAND gates.
When the combination of "1" and "3" is detected, the counter gets set to "1" and the flip flop gets reset (that makes it zero).
So the count goes: 01,02,03,04,05,06,07,08,09,10,11,12, then back to 01 to start over.
Detecting the "1" and the "3" would require a three input NAND gate or combination of two inputs gates.
For 24 hour time format it goes 00,01,02,03,...,21,22,23, then back to 00, so there you need to detect the count "24" in the hours digits.