Ayuda con este codigo

Hola amigos, tengo este codigo montado en un Arduino UNO que prende y apaga las luces (con una placa de reles) segun la hora (con un reloj RTC ), que me funcionaba hasta ahora, desde que cambie la configuracion horaria solo prende la primera luz (nisiquiera volviendo a poner los horarios anteriores), si me pueden ayudar, Saludos

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

RTC_DS1307 RTC;

unsigned int StartHr = 6;
unsigned int StartMin = 0;

unsigned int StartHr4 = 9;
unsigned int StartMin4 = 0;

unsigned int StartHr6 =  9;
unsigned int StartMin6 = 0;

unsigned int StartDayofWeek;
unsigned int CurrentDay;
unsigned int EndDay;

long Sleep = 1L;

long MultiMinute = 60000L;

boolean LightOn = false;

boolean LightOn4 = false;

boolean LightOn6 = false;

unsigned int EndHr = 23;
unsigned int EndMin = 59;

unsigned int EndHr4 = 21;
unsigned int EndMin4 = 0;

unsigned int EndHr6 = 21;
unsigned int EndMin6 = 0;

int ledPin = 13;

// Pins used to control latching relay
int RelayOn = 6;
int RelayOff = 6;

int RelayOn4 = 7;
int RelayOff4 = 7;

int RelayOn6 = 8;
int RelayOff6 = 8;

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

    pinMode(RelayOn, OUTPUT);
    pinMode(RelayOff,OUTPUT);

 pinMode(RelayOn4, OUTPUT);
    pinMode(RelayOff4,OUTPUT);

 pinMode(RelayOn6, OUTPUT);
    pinMode(RelayOff6,OUTPUT);

    RTC.adjust(DateTime(__DATE__, __TIME__));

  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();

// reley 1
    if (LightOn == false)
    {
      if (((int)now.hour() >= StartHr && (int)now.minute() >= StartMin) &&
         ((int)now.hour() <= EndHr && (int)now.minute() < EndMin))
      {
        // turn on light
        LightOn = true;
        digitalWrite(RelayOn, HIGH);

        Serial.print("Light On"); 

         // only need a short time to trigger the latching relay
        //then we can turn the port back off
//delay(1000);
//digitalWrite(RelayOn, LOW); 

      }
    }
    else
    {
      // Check curren time, turn off light when conditions are met
      if ((int)now.hour() >= EndHr && (int)now.minute() >= EndMin)
      {
        LightOn = false;
        // turn light off
        digitalWrite(RelayOff, HIGH);

        Serial.print("Light Off"); 

         // only need a short time to trigger the latching relay
        //then we can turn the port back off
        delay(1000);
        digitalWrite(RelayOff, LOW);
      }
    }

// Reley 4
    if (LightOn4 == false)
    {
      if (((int)now.hour() >= StartHr4 && (int)now.minute() >= StartMin4) &&
         ((int)now.hour() <= EndHr4 && (int)now.minute() < EndMin4))
      {
        // turn on light 4
        LightOn4 = true;
        digitalWrite(RelayOn4, HIGH);

        Serial.print("Light 4 On");  

      }
    }
    else
    {
      // Check curren time, turn off light when conditions are met
      if ((int)now.hour() >= EndHr4 && (int)now.minute() >= EndMin4)
      {
        LightOn4 = false;
        // turn light off
        digitalWrite(RelayOff4, HIGH);

        Serial.print("Light 4 Off"); 

         // only need a short time to trigger the latching relay
        //then we can turn the port back off
        delay(1000);
        digitalWrite(RelayOff4, LOW);
      }
    }

// Reley6
    if (LightOn6 == false)
    {
      if (((int)now.hour() >= StartHr6 && (int)now.minute() >= StartMin6) &&
         ((int)now.hour() <= EndHr6 && (int)now.minute() < EndMin6))
      {
        // turn on light
        LightOn6 = true;
        digitalWrite(RelayOn6, HIGH);

        Serial.print("Light On"); 

         // only need a short time to trigger the latching relay
        //then we can turn the port back off
//delay(1000);
//digitalWrite(RelayOn, LOW); 

      }
    }
    else
    {
      // Check curren time, turn off light when conditions are met
      if ((int)now.hour() >= EndHr6 && (int)now.minute() >= EndMin6)
      {
        LightOn6 = false;
        // turn light off
        digitalWrite(RelayOff6, HIGH);

        Serial.print("Light Off"); 

         // only need a short time to trigger the latching relay
        //then we can turn the port back off
        delay(1000);
        digitalWrite(RelayOff6, LOW);
      }
    }   

    delay((Sleep*MultiMinute));
}

verifica que el RTC no se ha quedado pillado. Manda la fecha al puerto serie para ver si la está actualizando.