Can my Arduino be a clock?

Thanks for all the replies, I wasn't expecting any so soon.

Whilst I appreciate that a separate real-time clock IC will the most accurate solution, I think I'll have a go at doing it on the arduino first ... more for the challenge of it than just to be difficult.

My design will have a keypad and a LCD, so there will be a mechanism to set the clock ... I think I'll also introduce a 'fiddle-factor' to give me a certain amount of tuning.

In case anyone is interested, my design is for a controller to for my fish tanks (I keep freshwater and a small marine). The main thing it will do is control the lights, there are 3 sets; daytime, dusk/dawn and nighttime, which go on and off at different times. I currently use plug-in mechanical timers at each socket. These are cheap but take a bit of setting up to get the lights to sequence as you want them to. There are commercially available controllers but they are expensive (£200 min). My idea is to build something from an arduino (say ~£25). Then if I'm not happy switching the mains electricity directly, I'll set it up to do X10 automation. I'll also pull in temperature monitoring, and maybe a system to run an automatic water top-up system (using float switches and a small water pump) ... saving even more money. I guess projects like these are more more about the hbby factor than purely money driven.

As for the clock thing, I'd be happy to share whatever I come up with, for interest and comment. Maybe even have a go at building a library? I'm not a strong programmer so can't promise super-efficient code but if it helps, I'm happy to participate.

Thanks All ..... regards ..... Matt