I have posted a sample program (seriously overkill but it was deliberately written as an example) on the MeLabs website for the DS1307 RTC...

http://www.melabs.com/resources/samp...ted/MN1307.txt

It allows you to Set the Time and Date, verifies for silly user entries (eg 31st of February), accounts for leap years, works out the Day of the Week, plays in 12 or 24 hour mode and makes Coffee...

OK... so I lied about the Coffee...

Melanie