Download the Library used HERE. Tested to work on Arduino IDE 1.0.1

RTClib.7z   RTClib.zip

Arduino Code:
  1.  
  2. #include "Wire.h"
  3. #include "RTClib.h"
  4.  
  5. RTC_DS1307 RTC;
  6.  
  7. void setup () {
  8. Serial.begin(9600);
  9. Wire.begin();
  10. RTC.begin();
  11.  
  12. if (! RTC.isrunning()) {
  13. Serial.println("RTC is NOT running!");
  14. // following line sets the RTC to the date & time this sketch was compiled
  15. //RTC.adjust(DateTime(__DATE__, __TIME__));
  16. }
  17. }
  18.  
  19. void loop () {
  20. DateTime now = RTC.now();
  21. int current_year=now.year();
  22. int current_month=now.month();
  23. int current_day=now.day();
  24. int current_hour=now.hour();
  25. int current_minute=now.minute();
  26. int current_second=now.second();
  27.  
  28. Serial.print(current_year);
  29. Serial.print('/');
  30. Serial.print(current_month);
  31. Serial.print('/');
  32. Serial.print(current_day);
  33. Serial.print(' ');
  34. Serial.print(current_hour);
  35. Serial.print(':');
  36. Serial.print(current_minute);
  37. Serial.print(':');
  38. Serial.print(current_second);
  39. Serial.println();
  40. delay(3000);
  41. }
  42.