light timer

hi everyone.

im wanting to make a timer for my fishtank lights. im switching to leds instead of flouresecnts. i pretty much know what i need to do to write the code but i have a question. do i need to buy the seperate clock shield for the uno or will the time libray work just fine for what i am wanting to do? i know how to code the actual program like i said and the buttons and all the good stuff that intails im just wanting to know if i really need the seperate clock or if the time library will work for me. thx

It depends on how accurate you want the time to be.
The time library uses the system clock and as such will drift over a period of weeks where as the shield should keep good time.

The time library will do quite fine, add an LCD on which you display the time and status and you will see it will drift a bit but not so much. You should add a means to update the time in your sketch. ReaklTimeClock / shields might be a bit more accurate, if you have an ethernetshield you can sync the time with your time server.

Another method could be use some sensors to detect sun coming up and going down and use that to sync your clock (you know the time halfway is approx 12:00 hrs)

Yea i planned on a lcd and buttons cause i want a user friendly way to input scheduals as im planning on selling them after i get mine done. So i think i will add the real clock then dont want time drift. Thx for the input.