Automated Reptile Control System(webserver, Data Logging, RTC and much more)

Go to the playground and look at the Time and TimeAlarms library. You don't have to actually set the time, but you already have an RTC, so it should be easy to do. In the Time header file are a lot of macros including days between dates and such. Also, out on the web are a ton of days between dates routines that you can use. Most of the samples also have the seconds between date that will work for you as well, although saving the unix time when you start and just subtracting it from the current time will give you seconds pretty easily.