This example makes use of the exceptional DT-INTS14 by Darrel Taylor and an old post of Bruce Reynolds about Timers.
Actually is a 24h clock based on the timer 1 of many chips in the 16F or 18F series.
The code is using 20MHz crystal and without any calibration it shows an accuracy of 2sec per day or 12 minutes per year.
Two buttons increment the Hours and Minutes to set the time.
Happy counting!
Ioannis