RTC 1307 1.5 huors too fast

Hi All,

I am having problems with a RTC1307. The following code on a Uno is working perfectly but is 1.5 hours too fast in data logging the time. I don’t know if this is an issue but I live in Central Standard Time Australia Daylight Savings and it appears to be displaying Eastern Standard Time not DLS.

Is there any way I can code the Serial.Print to minus the 1.5 hour time differnece?

Any help is much appreciated.

JC

#include <Wire.h>
#include "RTClib.h"

RTC_DS1307 RTC;

void setup () {
    Serial.begin(9600);
    Wire.begin();
    RTC.begin();
  // Check to see if the RTC is keeping time.  If it is, load the time from your computer.
  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // This will reflect the time that your sketch was compiled
    RTC.adjust(DateTime(__DATE__, __TIME__));
  }
}
void loop () {
    DateTime now = RTC.now(); 

    Serial.print(now.day(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.year(), DEC);
    Serial.print(' ');
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();    
    delay(1000);
}

Eastern Standard Time is half an hour behind Central Daylight Saving, but your real problem is much more likely to be that your clock is wrong because you haven't bothered to set it.

http://bildr.org/2011/03/ds1307-arduino/

Note that this has two programmes - one to set the RTC, the other to use it.

You can set your time easily in DS1307. You are using a different library and the link provided above has used different library so it won't be much of a use for you.

I have worked on DS1307.h Library and it has a command DS1307.setDate(16,4,7,0,17,50,04); for setting the time & date of DS1307. So, you should find similar example in your library examples.

Thank you I will try that