Davide Gironi has posted a DS1307 library for AVR Atmega:
The DS1307 serial real-time clock (RTC) is a low-power, full binary-coded decimal (BCD) clock/calendar.
This library set and get year, month, day, hour, minute and second from this RTC.
Setup parameters are stored in file ds1307.h
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 1MHz.