If anyone is interested in substantially improving the accuracy of the time from their DS1307 RTC I've come up with some coding that improves accuracy from (typically) 5 - 10 seconds lost per day to maybe a couple of seconds a week or better. The basic idea is:
1) monitor your RTC for a few days against a trustworthy clock such as here:
http://time.is/Adelaide.
2) work out how many milliseconds you loose (or gain) per hour. This is '
drift_ms_hour' in my sketch which stores this in NVRAM on the RTC itself (it has 56 bytes of NVRAM)
3) manually set/sync the time on the RTC to be as close as you can get it to UTC (say < 1 sec off) and write down exactly this time, to the second and it's equivalent time_t value (seconds since 1 Jan 1970 or whatever it is). This is called
timeWhenSet and is also stored in NVRAM.
4) Every time the sketch starts it reads
timeWhenSet and
drift_ms_hour from NVRAM, prints them, reads the (uncorrected) time from the RTC, and calculates how many seconds to add/subtract based on the drift_ms_hour characteric for this particular RTC. This corrected time is calculated every second from then on.
The sketch is attached as a ZIP (too large to paste in) most of which is plagiarised from others who really know how to code (like kurt's excellent scooterputer) but I'll claim the glory for the drift reduction functionality

(Apologies for all the PROGMEM gymnastics in this sketch, it's stripped down from another sketch where I was having problems with SRAM overflowing and need to move all the strings into flash memory, and basically I'm too lazy to convert the strings back)
Sure I could solve this by buying an upmarket RTC llike the DS3231, but this technique does same job, is free , and was fun to get working
