DS1307 RTC Programming

Hi, I baught an RTC module from ebay and i tried to programme it. I reffered DS1307 RTC tutorial tutorial.
According to that tutorial, I downloaded RTClib.h file from GitHub - adafruit/RTClib: A fork of Jeelab's fantastic RTC library link and saved that file in “D:\Program Files\arduino-1.0.1\libraries”. And then i compiled the programme mentioned below. And this is my 1st arduino programme(And i know toprogrammed 16F PICs)

// Date and time functions using a DS1307 RTC connected via I2C and Wire lib

#include <Wire.h>
#include “RTClib.h”

RTC_DS1307 RTC;

void setup () {
Serial.begin(57600);
Wire.begin();
RTC.begin();

if (! RTC.isrunning()) {
Serial.println(“RTC is NOT running!”);
// following line sets the RTC to the date & time this sketch was compiled
//RTC.adjust(DateTime(DATE, TIME));
}

}

void loop () {
DateTime now = RTC.now();

Serial.print(now.year(), DEC);
Serial.print(’/’);
Serial.print(now.month(), DEC);
Serial.print(’/’);
Serial.print(now.day(), DEC);
Serial.print(’ ‘);
Serial.print(now.hour(), DEC);
Serial.print(’:’);
Serial.print(now.minute(), DEC);
Serial.print(’:’);
Serial.print(now.second(), DEC);
Serial.println();

Serial.print(" since 1970 = ");
Serial.print(now.unixtime());
Serial.print("s = ");
Serial.print(now.unixtime() / 86400L);
Serial.println(“d”);

// calculate a date which is 7 days and 30 seconds into the future
DateTime future (now.unixtime() + 7 * 86400L + 30);

Serial.print(" now + 7d + 30s: ");
Serial.print(future.year(), DEC);
Serial.print(’/’);
Serial.print(future.month(), DEC);
Serial.print(’/’);
Serial.print(future.day(), DEC);
Serial.print(’ ‘);
Serial.print(future.hour(), DEC);
Serial.print(’:’);
Serial.print(future.minute(), DEC);
Serial.print(’:’);
Serial.print(future.second(), DEC);
Serial.println();

Serial.println();
delay(3000);
}

But there is an error in RTC.isrunning() function. can any one please help me to solve this question?

I don't think that it exists. Just get rid of it.

Then there is a problem in now.unixtime() function. Do you have any programme with you? because I just want to check the function of RTC

What problem? I've just compiled your sketch, with no problem at all.

crazyramila: According to that tutorial, I downloaded RTClib.h file from https://github.com/adafruit/RTClib/ link and saved that file in "D:\Program Files\arduino-1.0.1\libraries".

If all you downloaded was the RTClib.h file, then you didn't get the entire library, which is needed. You also need RTClib.cpp and keywords.txt