Trouble with RTC interface

So I just bought an RTC ds1307 and i have been trying to add the I2C interface by dowloading a library from GitHub - adafruit/RTClib: A fork of Jeelab's fantastic RTC library.

I have been reading MAKE:getting started with arduino 3rd edition,
and it is saying 'To use this library, click the DOWNLOAD ZIP button, and then unzip this file in the folder named libraries in your arduino sketch folder.'

I have done all that and even renamed the file to RTClib and when i open the arduino IDE and click FILE MENU to EXAMPLES the RTClib-ds1307 is nowhere to be found, help!

I am trying to test this RTC out for my irrigation system, any tips would help thankyou.

I have an arduino UNO and run windows 10.

You probably haven't lost it, just put it in the wrong place. There are more sophisticated way of doing things but you should be able to just trawl up the RTClib folder and put it with all the other libraries, in the folder named libraries.

FWIW, you can get by without a library anyway. I found this method useful.

If you intend to use the DS1307 in the field, you may find the accuracy leaves a bit to be desired. This because of the lack of temperature compensation. The DS3231 costs about $1 more, is far more accurate, and can use exactly the same code.

Hi Nick, your link didn't work. I cleaned it up:

That is my favorite way to read an RTC. Some of the RTC libraries seem to make it more difficult than it has to be.

Thank you.

Some of the RTC libraries seem to make it more difficult than it has to be.

Indeed. I have stuck with this all along. I don't quite understand why, but I get the impression it is consistently more space efficient than methods using a library.

Thanks I appreciate all the feedback.

I ended up storing it in my libraries through a simple search on the IDE that allowed me to extract the library directly from GitHub from my IDE.

Now I have the date and time uploaded to my RTC but I think I need to move or delete a line of code in order for the date and time to continue working instead of resetting back to the initial time I uploaded the program.

rtc.adjust(DateTime)DATE, TIME));

the date and time are correct on my computer but do I have to move this line of code around maybe??

Yes, you run it the first time to set the date/time, and must comment the line out in subsquent builds if you want to retain that original time.

	// following lines sets the RTC to a specific date & time.
	//RTC.adjust(DateTime("DEC 15 2015","09:58:45"));

	// The PCs current time when Arduino code is programmed in.
	//RTC.adjust(DateTime(F(__DATE__), F(__TIME__)));
	// COMMENT BOTH OUT  if actual DS1307/DS3231  times need retaining

LoL, who would know what your code is?, but this sounds rather like you have the same junk as I encountered. There is quite a bit of confusing stuff around in this arena, and it rather depends on how far you are along the road to Damascus before you see the light and get to sort the fair from the foul. This is why the method I alluded to is so good. It uses two programmes for the job, one to set the time, and the other to use it. This means you are not carrying superfluous code in practical applications, you never have any doubt about what you are doing, and one does not interfere with the other.